.top-nav .nav-link {
  white-space: nowrap;
}

.coord-help {
  font-size: 12px;
  color: #c7d2da;
}

.points-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.points-remarks {
  grid-column: 1 / -1;
}

.points-remarks textarea {
  min-height: 120px;
}

@media (max-width: 900px) {
  .points-form-grid {
    grid-template-columns: 1fr;
  }

  .points-remarks {
    grid-column: auto;
  }
}

/* ---------------- NAV LOG V6 ---------------- */
.navlog-page-container {
  max-width: 1900px;
}

.navlog-sheet-paper {
  background: linear-gradient(180deg, rgba(16, 34, 53, .92), rgba(11, 23, 36, .97));
  color: #eef6ff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  /* Prevents this grid item from growing to fit the leg table's min-width below,
     which used to push the whole page (header included) into horizontal scroll
     instead of only the table itself. */
  min-width: 0;
}

.navlog-top-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* Smaller toolbar buttons on narrower screens (small MacBook window, iPad)
   so more fit per row before wrapping, and they don't dominate the page. */
@media (max-width: 1100px) {
  .navlog-top-actions.button-row button {
    padding: 7px 10px;
    font-size: 13px;
    gap: 5px;
  }
}

@media (max-width: 760px) {
  .navlog-top-actions.button-row button {
    padding: 6px 8px;
    font-size: 12px;
    gap: 4px;
  }
}

.navlog-form-table,
.navlog-main-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, .018);
}

.navlog-form-table th,
.navlog-form-table td,
.navlog-main-table th,
.navlog-main-table td {
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 3px 5px;
  text-align: center;
  vertical-align: middle;
  color: #eef6ff;
  font-size: 12px;
}

.navlog-form-table th,
.navlog-main-table th {
  font-weight: 700;
  background: rgba(255, 255, 255, .055);
  letter-spacing: .1px;
}

.navlog-form-table input,
.navlog-form-table textarea,
.navlog-main-table input,
.navlog-main-table select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: #eef6ff;
  padding: 2px 4px;
  border-radius: 0;
  font-size: 11px;
  line-height: 1.2;
}

.navlog-form-table input::placeholder,
.navlog-form-table textarea::placeholder,
.navlog-main-table input::placeholder {
  color: rgba(238, 246, 255, .45);
}

.navlog-form-table textarea {
  resize: vertical;
  min-height: 68px;
  font-family: inherit;
}

.navlog-main-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.navlog-main-wrap::-webkit-scrollbar {
  height: 10px;
}

.navlog-main-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}

.navlog-main-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
}

.navlog-main-table {
  min-width: 1510px;
}

.navlog-main-table thead th {
  font-size: 11px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.navlog-main-table td {
  font-size: 11px;
  height: 33px;
}

.navlog-main-table td[data-out] {
  background: rgba(255, 255, 255, .015);
  font-weight: 600;
}

.navlog-main-table tfoot td {
  font-weight: 700;
  background: rgba(255, 255, 255, .04);
}

.totals-label {
  text-align: right !important;
  padding-right: 12px !important;
}

.navlog-subgrid {
  display: grid;
  grid-template-columns: 46% 54%;
  gap: 0;
}

.navlog-bottom-grid {
  display: grid;
  grid-template-columns: 46% 34% 20%;
  gap: 0;
}

.navlog-clearance-table textarea {
  min-height: 74px;
}

.navlog-remarks-table textarea {
  min-height: 72px;
}

.navlog-fuel-summary-table th,
.navlog-fuel-summary-table td {
  text-align: left;
}

.navlog-fuel-summary-table td {
  text-align: right;
  font-weight: 700;
}

.small-col {
  width: 96px;
}

.c-lbl {
  width: 11%;
}

.c-lbl-wide {
  width: 15%;
}

.c-val-wide {
  width: 11%;
}

.c-val-date {
  width: 11%;
}

/* Tuned column sizes for better balance */
#navLogTable th:nth-child(1),
#navLogTable td:nth-child(1),
#navAltTable th:nth-child(1),
#navAltTable td:nth-child(1) {
  width: 44px;
}

#navLogTable th:nth-child(2),
#navLogTable td:nth-child(2),
#navLogTable th:nth-child(3),
#navLogTable td:nth-child(3),
#navAltTable th:nth-child(2),
#navAltTable td:nth-child(2),
#navAltTable th:nth-child(3),
#navAltTable td:nth-child(3) {
  width: 104px;
}

#navLogTable th:nth-child(4),
#navLogTable td:nth-child(4),
#navAltTable th:nth-child(4),
#navAltTable td:nth-child(4) {
  width: 72px;
}

#navLogTable th:nth-child(5),
#navLogTable td:nth-child(5),
#navAltTable th:nth-child(5),
#navAltTable td:nth-child(5) {
  width: 56px;
}

#navLogTable th:nth-child(6),
#navLogTable td:nth-child(6),
#navLogTable th:nth-child(7),
#navLogTable td:nth-child(7),
#navAltTable th:nth-child(6),
#navAltTable td:nth-child(6),
#navAltTable th:nth-child(7),
#navAltTable td:nth-child(7) {
  width: 72px;
}

#navLogTable th:nth-child(8),
#navLogTable td:nth-child(8),
#navLogTable th:nth-child(9),
#navLogTable td:nth-child(9),
#navAltTable th:nth-child(8),
#navAltTable td:nth-child(8),
#navAltTable th:nth-child(9),
#navAltTable td:nth-child(9) {
  width: 66px;
}

#navLogTable th:nth-child(10),
#navLogTable td:nth-child(10),
#navLogTable th:nth-child(11),
#navLogTable td:nth-child(11),
#navLogTable th:nth-child(12),
#navLogTable td:nth-child(12),
#navLogTable th:nth-child(13),
#navLogTable td:nth-child(13),
#navLogTable th:nth-child(14),
#navLogTable td:nth-child(14),
#navLogTable th:nth-child(15),
#navLogTable td:nth-child(15),
#navLogTable th:nth-child(16),
#navLogTable td:nth-child(16),
#navLogTable th:nth-child(17),
#navLogTable td:nth-child(17),
#navLogTable th:nth-child(18),
#navLogTable td:nth-child(18),
#navAltTable th:nth-child(10),
#navAltTable td:nth-child(10),
#navAltTable th:nth-child(11),
#navAltTable td:nth-child(11),
#navAltTable th:nth-child(12),
#navAltTable td:nth-child(12),
#navAltTable th:nth-child(13),
#navAltTable td:nth-child(13),
#navAltTable th:nth-child(14),
#navAltTable td:nth-child(14),
#navAltTable th:nth-child(15),
#navAltTable td:nth-child(15),
#navAltTable th:nth-child(16),
#navAltTable td:nth-child(16),
#navAltTable th:nth-child(17),
#navAltTable td:nth-child(17),
#navAltTable th:nth-child(18),
#navAltTable td:nth-child(18) {
  width: 60px;
}

#navLogTable th:nth-child(19),
#navLogTable td:nth-child(19),
#navAltTable th:nth-child(19),
#navAltTable td:nth-child(19) {
  width: 46px;
}

/* NOTE: an earlier version of this file made the LEG/FROM/TO columns
   sticky with `position: sticky`. Reverted — in the Electron desktop app
   this caused the ALT/FL column to render at 0 width (data effectively
   hidden), a `position: sticky` + `border-collapse: collapse` table
   rendering bug that couldn't be reproduced or safely worked around here.
   A frozen-columns approach is possible but needs a more robust
   implementation (e.g. a second, non-scrolling table kept in sync via
   JS) — left as a future improvement rather than risk hiding flight data. */

.navlog-defaults-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.navlog-defaults-box {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #132235;
  color: #f2f7fb;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.navlog-defaults-box input {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 10px 12px;
}

.navlog-defaults-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .navlog-defaults-modal-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .navlog-defaults-modal-grid {
    grid-template-columns: 1fr;
  }
}
/* --- Merged from navlog_fix.css (kept at the end to preserve the original cascade order) --- */
/* Acrescenta este ficheiro e inclui-o no navlog.html */
.navlog-form-table th,
.navlog-form-table td,
.navlog-main-table th,
.navlog-main-table td,
#navLogTable td,
#navAltTable td {
  text-align: center;
  vertical-align: middle;
}

.navlog-form-table input,
.navlog-form-table select,
.navlog-main-table input,
.navlog-main-table select {
  text-align: center;
}

#navLogTable [data-out],
#navAltTable [data-out],
#nlTotalNmCell,
#nlTotalTimeCell,
#nlTripFuelCell,
#nlTripFuelTotalCell,
#nlSummaryTripFuel,
#nlSummaryAlternateFuel,
#nlSummaryTaxiFuel,
#nlSummaryContingency,
#nlSummaryHolding,
#nlSummaryRequired {
  text-align: center;
}
/* --- Day-to-day UX robustness (validation + saved indicator) --- */
.field-missing {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35) inset;
}

#navSavedIndicator {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85em;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  color: #4ade80;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#navSavedIndicator.visible {
  opacity: 1;
  transform: translateY(0);
}
