/* Avel24 web planner — chart-room look: deep baltic navy, wind-cyan accent,
   route yellow. Single deliberate dark theme for the beta (chart-plotter
   convention; daylight mode arrives with the native apps). */

:root {
  --bg: #0f171c;
  --panel: #172128;
  --panel-2: #1e2a32;
  --ink: #e6eef2;
  --muted: #90a4ae;
  --line: #28353d;
  --accent: #3fb3cd;
  --route: #ffd23f;
  --good: #4ecb8f;
  --bad: #e5705f;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font: 15px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body { display: flex; }

#map { flex: 1; height: 100vh; background: #0b1216; }

#panel {
  width: 380px;
  min-width: 340px;
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand .wordmark {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.brand .wordmark span { color: var(--accent); }
.brand .tagline {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0 0 5px;
}

input, select, button {
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.row button { width: auto; white-space: nowrap; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06232b;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}
button.primary:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary:not(:disabled):hover { filter: brightness(1.1); }

.hint { color: var(--muted); font-size: 0.8rem; margin-top: 8px; }
.hint.ok { color: var(--good); }
.hint.err { color: var(--bad); }

#depart { margin-bottom: 4px; }

.eta {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.eta.miss { color: var(--bad); font-size: 1rem; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.stats b { color: var(--ink); }

h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 14px 0 6px;
}

.maneuvers { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.maneuvers li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.maneuvers li:last-child { border-bottom: none; }
.maneuvers .kind { color: var(--accent); font-weight: 700; }
.maneuvers .empty { color: var(--muted); }

.tablewrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
th, td { text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
th:first-child, td:first-child { text-align: left; }

.foot {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.foot .disclaimer { margin: 6px 0 0; opacity: 0.85; }

/* Leaflet dark harmony */
.leaflet-container { background: #0b1216; }
.leaflet-control-attribution {
  background: rgba(15, 23, 28, 0.85) !important;
  color: var(--muted) !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }

@media (max-width: 760px) {
  body { flex-direction: column-reverse; }
  #map { height: 48vh; }
  #panel {
    width: 100%;
    min-width: 0;
    height: 52vh;
    border-right: none;
    border-top: 1px solid var(--line);
  }
}

.brandrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lang {
  width: auto;
  font-size: 0.8rem;
  padding: 5px 8px;
  background: var(--panel-2);
}

/* SKIP-50 — weather layers */
.checks { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.timelabel { font-size: 0.85rem; font-weight: 600; padding: 8px 0; color: var(--accent); }
#timeSlider { width: 100%; accent-color: var(--accent); margin-top: 4px; }
#layers h2 { margin-top: 0; }
