:root {
  --bg: #061218;
  --bg-deep: #030b0f;
  --panel: rgba(10, 31, 40, 0.86);
  --panel-solid: #0a1f28;
  --panel-raised: #0d2833;
  --line: rgba(140, 196, 210, 0.14);
  --line-strong: rgba(140, 196, 210, 0.28);
  --text: #e8f6f8;
  --muted: #8ba9b3;
  --faint: #5d7c87;
  --teal: #25e0c2;
  --cyan: #4cc9f0;
  --amber: #ffbd4a;
  --red: #ff6b6b;
  --violet: #9d8cff;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --radius-sm: 11px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(37, 224, 194, 0.12), transparent 35%),
    radial-gradient(circle at 95% 0%, rgba(76, 201, 240, 0.1), transparent 32%),
    linear-gradient(160deg, #07161d 0%, #040d11 72%);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 3.3vw, 3.3rem); line-height: 1.04; letter-spacing: -0.045em; margin-bottom: 0.7rem; font-weight: 650; }
h2 { font-size: 1.12rem; letter-spacing: -0.015em; margin-bottom: 0; font-weight: 620; }
svg { display: block; }

.muted { color: var(--muted); }
.small { font-size: 0.78rem; }
.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 670;
  letter-spacing: -0.025em;
  font-size: 1.08rem;
  color: var(--text);
}
.brand-mark { width: 32px; height: 32px; color: var(--teal); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-large { font-size: 1.45rem; }
.brand-large .brand-mark { width: 42px; height: 42px; }
.env-badge, .count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 0.52rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(16, 49, 61, 0.7);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.button:hover { background: rgba(25, 69, 83, 0.8); border-color: rgba(37, 224, 194, 0.4); }
.button:active { transform: translateY(1px); }
.button.primary {
  background: linear-gradient(135deg, #20d9bd, #1aa9c9);
  border-color: transparent;
  color: #03231f;
  box-shadow: 0 12px 30px rgba(37, 224, 194, 0.2);
}
.button.primary:hover { background: linear-gradient(135deg, #35e6ca, #2bb7d5); }
.button.ghost { background: transparent; }
.button.small { min-height: 33px; padding: 0 0.7rem; font-size: 0.76rem; }
.button.full { width: 100%; min-height: 46px; margin-top: 0.4rem; }

.login-body {
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 18% 28%, rgba(37, 224, 194, 0.15), transparent 36%),
    radial-gradient(circle at 75% 80%, rgba(76, 201, 240, 0.12), transparent 38%),
    linear-gradient(145deg, #06161d, #02090c 78%);
}
.login-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(5, 18, 24, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  min-height: 640px;
  padding: clamp(2rem, 4vw, 3.7rem);
  background:
    linear-gradient(140deg, rgba(10, 49, 60, 0.92), rgba(5, 26, 34, 0.74)),
    repeating-linear-gradient(115deg, transparent 0 34px, rgba(255, 255, 255, 0.018) 34px 35px);
  border-right: 1px solid var(--line);
}
.login-aside::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 7%;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(37, 224, 194, 0.17);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(37, 224, 194, 0.03), 0 0 0 104px rgba(37, 224, 194, 0.02);
  pointer-events: none;
}
.login-copy { position: relative; z-index: 1; max-width: 480px; }
.login-copy h1 { font-size: clamp(2.8rem, 5vw, 4.9rem); }
.login-copy .muted { max-width: 410px; font-size: 1.02rem; }
.login-metrics {
  display: flex;
  gap: 2.2rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.login-metrics div { display: flex; flex-direction: column; }
.login-metrics strong { font-size: 1.28rem; letter-spacing: -0.03em; color: var(--teal); }
.login-metrics span { color: var(--muted); font-size: 0.75rem; }
.login-panel { display: grid; place-items: center; padding: clamp(2rem, 4vw, 3.7rem); }
.login-form { width: min(100%, 360px); }
.login-form h2 { font-size: 2rem; letter-spacing: -0.04em; margin-bottom: 0.4rem; }
.login-form .muted { font-size: 0.9rem; margin-bottom: 1.6rem; }
.login-form label { display: block; margin: 1rem 0 0.4rem; font-size: 0.78rem; font-weight: 620; color: #c8dde2; }
.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 9, 12, 0.5);
  color: var(--text);
  padding: 0 0.9rem;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.login-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37, 224, 194, 0.12); }
.login-foot { margin: 1.25rem 0 0; color: var(--faint); text-align: center; font-size: 0.7rem; }
.alert {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 9px;
  background: rgba(255, 107, 107, 0.1);
  color: #ffc0c0;
  font-size: 0.82rem;
}

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.2rem);
  background: rgba(3, 13, 18, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.topbar-right { display: flex; align-items: center; gap: 0.8rem; }
.topbar form { margin: 0; }
.utc-clock { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #d6e9ed;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.user-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px var(--teal); }
.content { width: min(1580px, 100%); margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.4rem); }
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.6rem 0 1.6rem;
}
.hero h1 { margin-bottom: 0.55rem; }
.hero-copy { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }
.hero-actions { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 0.3rem; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(37, 224, 194, 0.25);
  border-radius: 999px;
  color: #a9f4e7;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(37, 224, 194, 0.07);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(37, 224, 194, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 224, 194, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(37, 224, 194, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 224, 194, 0); }
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.1rem; }
.kpi {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(14, 42, 52, 0.82), rgba(7, 25, 32, 0.78));
}
.kpi::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -20px;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(37, 224, 194, 0.1);
  border-radius: 50%;
}
.kpi-label { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.12em; }
.kpi strong { display: block; margin: 0.35rem 0 0.05rem; font-size: clamp(1.55rem, 2.2vw, 2.2rem); letter-spacing: -0.04em; font-weight: 650; }
.kpi-foot { color: var(--faint); font-size: 0.7rem; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}
.feeds-panel { margin-bottom: 1.1rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.8rem;
}
.feed-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; padding: 0 1.15rem 1.15rem; }
.feed-card {
  display: flex;
  cursor: pointer;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 24, 31, 0.65);
  transition: border-color 160ms ease, transform 160ms ease;
}
.feed-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.feed-card-top { display: flex; align-items: start; justify-content: space-between; gap: 0.5rem; }
.feed-name { font-weight: 640; font-size: 0.86rem; line-height: 1.25; overflow-wrap: anywhere; }
.feed-kind { margin-top: 0.2rem; color: var(--faint); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; }
.feed-status { display: inline-flex; align-items: center; gap: 0.32rem; flex-shrink: 0; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status-online .status-dot { background: var(--teal); box-shadow: 0 0 8px rgba(37, 224, 194, 0.7); }
.status-online { color: var(--teal); }
.status-waiting .status-dot { background: var(--amber); }
.status-waiting { color: var(--amber); }
.status-blocked .status-dot { background: var(--red); }
.status-blocked { color: #ff9c9c; }
.status-degraded .status-dot { background: var(--violet); }
.status-degraded { color: var(--violet); }
.status-offline .status-dot { background: #536b73; }
.status-offline { color: var(--faint); }
.status-starting .status-dot { background: var(--cyan); animation: pulse 1.8s infinite; }
.status-starting { color: var(--cyan); }
.feed-metrics { display: flex; gap: 0.9rem; color: var(--muted); font-size: 0.7rem; }
.feed-metrics strong { color: var(--text); font-weight: 620; }
.feed-message { color: var(--muted); font-size: 0.73rem; line-height: 1.4; min-height: 2.05em; }
.feed-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 0.65rem; margin-top: auto; }
.feed-link { color: var(--muted); font-size: 0.68rem; }
.feed-link:hover { color: var(--teal); }
.monitor-button { border: 0; background: transparent; color: var(--teal); font-size: 0.72rem; font-weight: 650; cursor: pointer; padding: 0.1rem 0; }
.skeleton-card { min-height: 155px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(100deg, rgba(255,255,255,0.015) 30%, rgba(255,255,255,0.045) 50%, rgba(255,255,255,0.015) 70%); background-size: 200% 100%; animation: shimmer 1.7s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.split-main { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.72fr); gap: 1.1rem; margin-bottom: 1.1rem; }
.map-panel { min-width: 0; overflow: hidden; }
.map-canvas { height: clamp(440px, 52vh, 650px); background: #071a21; }
.map-footer { display: flex; flex-wrap: wrap; gap: 1.1rem; padding: 0.65rem 1.15rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.7rem; }
.map-footer span { display: inline-flex; align-items: center; gap: 0.4rem; }
.vessel-type-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; }
.vessel-type-legend.is-floating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.24rem 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(130, 190, 200, 0.22);
  border-radius: 9px;
  background: rgba(3, 18, 23, 0.84);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  min-width: 230px;
}
.vessel-type-heading { grid-column: 1 / -1; color: var(--teal); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.vessel-type-item { display: inline-flex; align-items: center; gap: 0.28rem; white-space: nowrap; font-size: 0.66rem; cursor: pointer; }
.vessel-type-item input { width: 12px; height: 12px; margin: 0; accent-color: var(--teal); cursor: pointer; flex: none; }
.vessel-type-swatch { width: 10px; height: 10px; flex: none; display: inline-block; clip-path: polygon(100% 50%, 0 0, 28% 50%, 0 100%); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.one-source { background: var(--cyan); }
.legend-dot.multi-source { background: var(--amber); }
.legend-hex { width: 9px; height: 9px; border-radius: 2px; display: inline-block; background: rgba(37, 224, 194, 0.2); border: 1px solid var(--teal); }
.map-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.75rem; }
.toggle { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.72rem; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--teal); }
.vessel-panel { display: flex; flex-direction: column; min-width: 0; }
.search-input {
  margin: 0 1.15rem 0.6rem;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(2, 12, 16, 0.55);
  color: var(--text);
  padding: 0 0.75rem;
  font-size: 0.8rem;
  outline: none;
}
.search-input:focus { border-color: rgba(37, 224, 194, 0.45); }
.vessel-list { overflow: auto; padding: 0 0.7rem 0.7rem; height: clamp(400px, 48vh, 590px); }
.vessel-item {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid rgba(140, 196, 210, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease;
}
.vessel-item:hover { background: rgba(37, 224, 194, 0.045); }
.vessel-item-top { display: flex; gap: 0.6rem; justify-content: space-between; align-items: baseline; }
.vessel-item-name { font-weight: 610; font-size: 0.82rem; line-height: 1.3; overflow-wrap: anywhere; }
.vessel-item-speed { color: var(--teal); font-family: var(--mono); font-size: 0.68rem; white-space: nowrap; }
.vessel-item-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; margin-top: 0.3rem; color: var(--faint); font-size: 0.66rem; }
.source-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.42rem; }
.source-chip { padding: 0.12rem 0.4rem; border-radius: 999px; background: rgba(76, 201, 240, 0.08); border: 1px solid rgba(76, 201, 240, 0.18); color: #9bd9e8; font-size: 0.58rem; }
.source-chip.multi { background: rgba(255, 189, 74, 0.08); border-color: rgba(255, 189, 74, 0.2); color: #f5ce86; }
.empty-state { color: var(--faint); font-size: 0.8rem; padding: 1.2rem 0.5rem; text-align: center; }
.count-badge { color: var(--teal); border-color: rgba(37, 224, 194, 0.25); }

.table-wrap { overflow: auto; }
.table-wrap.compact { max-height: 350px; }
table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
th {
  text-align: left;
  padding: 0.55rem 1.15rem;
  color: var(--faint);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(3, 15, 20, 0.35);
}
td { padding: 0.62rem 1.15rem; border-bottom: 1px solid rgba(140, 196, 210, 0.07); color: #c9dde2; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable-row { cursor: pointer; }
tr.clickable-row:hover td { background: rgba(37, 224, 194, 0.045); }
td.mono, .mono { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.empty-cell { text-align: center; color: var(--faint); padding: 1.5rem; }
.record-note { margin: 0; padding: 0 1.15rem 0.55rem; color: var(--muted); font-size: 0.76rem; }
.record-note.muted { color: var(--faint); font-size: 0.7rem; }
.records-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.65rem; padding: 0.75rem 1.15rem; border-top: 1px solid var(--line); }
.records-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; }
.records-page-label { color: var(--muted); font-size: 0.72rem; padding: 0 0.35rem; white-space: nowrap; }
.records-pagination .button:disabled { opacity: 0.38; cursor: default; }
.record-primary { color: var(--text); font-weight: 620; max-width: 360px; overflow-wrap: anywhere; }
.record-fields-line { display: flex; flex-wrap: wrap; gap: 0.2rem 0.55rem; color: var(--faint); font-size: 0.67rem; }
.record-type-chip { display: inline-block; padding: 0.12rem 0.42rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 0.6rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.record-type-chip.position { color: var(--cyan); border-color: rgba(76, 201, 240, 0.25); background: rgba(76, 201, 240, 0.07); }
.record-type-chip.port { color: var(--teal); border-color: rgba(37, 224, 194, 0.25); background: rgba(37, 224, 194, 0.07); }
.record-type-chip.alert { color: var(--amber); border-color: rgba(255, 189, 74, 0.25); background: rgba(255, 189, 74, 0.07); }
.record-type-chip.weather { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.08); }
.record-modal { width: min(860px, calc(100vw - 2rem)); max-height: 90vh; overflow: auto; }
.record-modal-inner { padding: 1.2rem; }
.record-modal-meta { margin: 0.3rem 0 0.75rem; color: var(--faint); font-size: 0.7rem; overflow-wrap: anywhere; }
.record-field-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.record-field-wrap table { font-size: 0.74rem; }
.record-field-wrap th { width: 190px; padding: 0.42rem 0.65rem; border-top: 0; text-transform: none; letter-spacing: 0; font-size: 0.7rem; color: var(--muted); vertical-align: top; }
.record-field-wrap td { padding: 0.42rem 0.65rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-raw { margin-top: 0.8rem; }
.record-raw summary { color: var(--teal); cursor: pointer; font-size: 0.76rem; }
.record-raw pre { max-height: 280px; overflow: auto; margin: 0.55rem 0 0; padding: 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(1, 7, 10, 0.55); color: var(--muted); font-family: var(--mono); font-size: 0.66rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.select-input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0.5rem;
  background: var(--panel-raised);
  color: var(--text);
  font-size: 0.75rem;
}
.pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.48rem; border-radius: 999px; font-size: 0.62rem; border: 1px solid var(--line); color: var(--muted); }
.pill.active { color: var(--teal); border-color: rgba(37, 224, 194, 0.25); background: rgba(37, 224, 194, 0.06); }

.monitor-panel { margin-bottom: 1.1rem; }
.monitor-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 1.15rem 0.85rem; }
.monitor-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0.42rem 0.65rem;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 140ms ease;
}
.monitor-tab:hover { color: var(--text); border-color: var(--line-strong); }
.monitor-tab.active { color: #04221d; background: var(--teal); border-color: var(--teal); font-weight: 650; }
.monitor-tab .tab-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 0.32rem; opacity: 0.75; }
.monitor-stage { padding: 0 1.15rem; }
.monitor-placeholder[hidden] { display: none; }
.monitor-placeholder {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(37, 224, 194, 0.045), transparent 55%);
  text-align: center;
  padding: 2rem;
}
.monitor-glyph { color: var(--teal); font-size: 2.1rem; opacity: 0.7; }
.monitor-placeholder p { margin: 0; font-size: 0.9rem; }
.monitor-placeholder .small { max-width: 520px; }
.monitor-frame { display: block; width: 100%; height: clamp(480px, 67vh, 820px); border: 1px solid var(--line-strong); border-radius: 12px; background: #000; }
.monitor-frame[hidden] { display: none; }
.monitor-note { margin: 0.65rem 1.15rem 1.05rem; color: var(--faint); font-size: 0.7rem; }
.split-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0.2rem 1rem; color: var(--faint); font-size: 0.68rem; }

.leaflet-container { background: #071a21; font-family: var(--font); }
.leaflet-control-attribution { background: rgba(3, 13, 18, 0.75) !important; color: #7b98a2 !important; }
.leaflet-control-attribution a { color: #9bc9d5 !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0b2631; color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 0.75rem 0.9rem; font-size: 0.76rem; line-height: 1.45; }
.leaflet-popup-content strong { display: block; font-size: 0.9rem; margin-bottom: 0.15rem; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.map-popup-meta { color: var(--muted); font-size: 0.68rem; }
.map-popup-sources { margin-top: 0.35rem; color: var(--cyan); font-size: 0.65rem; }
.leaflet-tooltip { background: #0b2631; border: 1px solid var(--line-strong); color: var(--text); box-shadow: var(--shadow); font-size: 0.7rem; }

@media (max-width: 1180px) {
  .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-main { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-metrics { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-main, .split-lower { grid-template-columns: 1fr; }
  .vessel-list { height: 340px; }
  .utc-clock { display: none; }
}
@media (max-width: 620px) {
  .content { padding: 1rem; }
  .hero { align-items: start; flex-direction: column; gap: 1rem; }
  .hero-actions { width: 100%; justify-content: space-between; }
  .kpi-grid, .feed-grid { grid-template-columns: 1fr; }
  .feed-card { min-height: auto; }
  .topbar-right .user-chip { display: none; }
  .login-body { padding: 0; }
  .login-shell { border-radius: 0; border: 0; min-height: 100vh; }
  .login-aside { min-height: 280px; padding: 1.5rem; }
  .login-panel { padding: 1.5rem; }
  .panel-head { align-items: start; }
  .map-canvas { height: 380px; }
  .footer { flex-direction: column; }
}

.toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 100;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(37, 224, 194, 0.3);
  border-radius: 10px;
  background: rgba(5, 28, 35, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

.topnav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 12, 16, 0.4);
}
.topnav a {
  padding: 0.38rem 0.7rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}
.topnav a:hover { color: var(--text); background: rgba(37, 224, 194, 0.055); text-decoration: none; }
.topnav a.active { color: #04231e; background: var(--teal); }

.feed-modal {
  width: min(520px, calc(100vw - 2rem));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0;
  color: var(--text);
  background: linear-gradient(160deg, #0c2631, #07171e);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.feed-modal::backdrop {
  background: rgba(1, 7, 10, 0.72);
  backdrop-filter: blur(4px);
}
.feed-modal form { padding: 1.25rem; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.modal-head h2 { font-size: 1.35rem; letter-spacing: -0.03em; margin-bottom: 0.2rem; }
.modal-close {
  appearance: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-label { display: block; margin: 1.1rem 0 0.4rem; color: #c8dde2; font-size: 0.78rem; font-weight: 620; }
.schedule-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(0, 9, 12, 0.5);
  color: var(--text);
  padding: 0 0.8rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  outline: none;
}
.schedule-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37, 224, 194, 0.12); }
.preset-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 0.9rem; }
.preset {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0.32rem 0.55rem;
  font-size: 0.7rem;
  cursor: pointer;
}
.preset:hover { color: var(--teal); border-color: rgba(37, 224, 194, 0.35); }
.modal-status { min-height: 1.3em; margin: 0.7rem 0 0; color: var(--muted); font-size: 0.76rem; }
.modal-status.error { color: #ff9c9c; }
.modal-status.success { color: var(--teal); }
.modal-actions { display: flex; justify-content: end; gap: 0.55rem; margin-top: 0.8rem; }

.resource-list { display: flex; flex-direction: column; gap: 0.85rem; padding: 0 1.15rem 1.15rem; }
.resource-item { display: flex; flex-direction: column; gap: 0.35rem; }
.resource-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.76rem; }
.resource-head strong { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 0.7rem; }
.resource-bar { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(140, 196, 210, 0.12); }
.resource-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--cyan)); transition: width 500ms ease, background 250ms ease; }
.resource-bar i.warn { background: linear-gradient(90deg, var(--amber), #ff9f43); }
.resource-bar i.critical { background: linear-gradient(90deg, #ff6b6b, #ff3d81); }

.stat-list { display: flex; flex-direction: column; padding: 0 1.15rem 1.15rem; }
.stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.48rem 0; border-bottom: 1px solid rgba(140, 196, 210, 0.08); font-size: 0.78rem; }
.stat-row:last-child { border-bottom: 0; }
.stat-key { color: var(--muted); }
.stat-value { color: var(--text); font-family: var(--mono); font-size: 0.72rem; text-align: right; }
.source-positions { padding: 0 1.15rem 1.15rem; border-top: 1px solid var(--line); }
.source-position-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; color: var(--muted); font-size: 0.72rem; border-bottom: 1px solid rgba(140, 196, 210, 0.07); }
.source-position-row:last-child { border-bottom: 0; }
.source-position-row strong { color: var(--text); font-family: var(--mono); font-weight: 500; }
.health-error { color: #ff9c9c; font-size: 0.76rem; padding: 0.5rem 1.15rem 1.15rem; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; justify-content: center; }
  .topbar-right { margin-left: auto; }
}

.kpi strong.ok { color: var(--teal); }
.kpi strong.bad { color: var(--red); }

.map-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  gap: 1.1rem;
  margin-bottom: 1.1rem;
  align-items: stretch;
}
.map-panel-full { min-width: 0; overflow: hidden; }
.map-canvas-large { height: clamp(540px, calc(100vh - 17rem), 920px); }
.map-side-panel { display: flex; flex-direction: column; min-width: 0; }
.map-vessel-list { height: clamp(420px, calc(100vh - 24rem), 760px); }
.map-list-note { margin: 0; padding: 0 1rem 0.9rem; color: var(--faint); font-size: 0.68rem; }
.map-footer-wide { gap: 0.85rem; }
.map-hero { padding-bottom: 1.1rem; }
.map-hero h1 { margin-bottom: 0.5rem; }

@media (max-width: 1000px) {
  .map-page-grid { grid-template-columns: 1fr; }
  .map-canvas-large { height: clamp(460px, 62vh, 720px); }
  .map-vessel-list { height: 360px; }
}

.legend-arrow {
  display: inline-block;
  width: 12px;
  height: 8px;
  position: relative;
}
.legend-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 8px;
  height: 1px;
  background: var(--teal);
}
.legend-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 1px;
  border-left: 5px solid var(--teal);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}
.map-direction-canvas {
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
}
.vessel-modal {
  width: min(840px, calc(100vw - 2rem));
  max-height: 90vh;
  overflow: auto;
}
.vessel-modal-inner { padding: 1.2rem; }
.vessel-modal-chips { margin: 0.4rem 0 0; }
.vessel-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.1rem;
  margin-top: 0.8rem;
}
.vessel-field-list {
  padding: 0;
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.vessel-field-list .stat-row { padding: 0.42rem 0.65rem; }
.vessel-field-list .stat-key { overflow-wrap: anywhere; }
.source-record-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 310px;
  overflow: auto;
}
.source-record {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  background: rgba(3, 15, 20, 0.35);
}
.source-record-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.source-record-head strong { font-size: 0.78rem; }
.source-record-head span { color: var(--faint); font-size: 0.66rem; }
.source-record .stat-row { padding: 0.25rem 0; font-size: 0.7rem; }
.route-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.route-panel p { margin-bottom: 0.25rem; }
.route-controls { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.route-controls .select-input { min-width: 120px; }
.route-status { color: var(--teal); }
@media (max-width: 700px) {
  .vessel-modal-grid { grid-template-columns: 1fr; }
  .route-panel { align-items: stretch; flex-direction: column; }
  .route-controls { justify-content: flex-end; }
}

.map-route-canvas {
  position: absolute;
  inset: 0;
  z-index: 445;
  pointer-events: none;
}
.route-gradient {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--faint);
  font-size: 0.64rem;
}
.route-gradient[hidden] { display: none; }
.route-gradient i {
  display: inline-block;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(58, 134, 255), rgb(37, 224, 194), rgb(255, 189, 74), rgb(255, 93, 93));
}
.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover { color: var(--teal); }

.alert-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(140px, 1fr));
  gap: 0.55rem;
  padding: 0 1.15rem 0.9rem;
}
.alert-filters .search-input { margin: 0; }
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1.15rem 0.4rem;
  max-height: 68vh;
  overflow: auto;
}
.alert-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(155deg, rgba(13, 40, 50, 0.7), rgba(5, 22, 29, 0.66));
}
.alert-card.inactive { opacity: 0.62; }
.alert-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.alert-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.alert-category, .alert-state, .alert-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  color: var(--muted);
}
.category-port { color: var(--teal); border-color: rgba(37, 224, 194, 0.3); background: rgba(37, 224, 194, 0.06); }
.category-vessel { color: var(--cyan); border-color: rgba(76, 201, 240, 0.3); background: rgba(76, 201, 240, 0.06); }
.category-general { color: var(--violet); border-color: rgba(157, 140, 255, 0.3); background: rgba(157, 140, 255, 0.06); }
.category-weather { color: var(--amber); border-color: rgba(255, 189, 74, 0.3); background: rgba(255, 189, 74, 0.06); }
.category-port_status { color: #ff9c9c; border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.06); }
.alert-state.active { color: var(--teal); border-color: rgba(37, 224, 194, 0.25); }
.alert-state.inactive { color: var(--faint); }
.alert-source { color: var(--faint); font-size: 0.68rem; text-align: right; }
.alert-title { margin: 0.55rem 0 0.3rem; font-size: 0.94rem; line-height: 1.35; letter-spacing: -0.01em; }
.alert-description { margin: 0; color: #b7cdd3; font-size: 0.79rem; line-height: 1.55; white-space: pre-line; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.55rem; }
.alert-chip.port { color: var(--teal); }
.alert-chip.vessel { color: var(--cyan); }
.alert-chip.region { color: var(--muted); font-family: var(--mono); }
.alert-dates { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.55rem; color: var(--faint); font-size: 0.67rem; }
.alert-actions { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 0.8rem; margin-top: 0.6rem; }
.alert-link { font-size: 0.7rem; }
.alert-source-name { color: var(--faint); font-size: 0.67rem; }
.alert-raw { margin-left: auto; color: var(--faint); font-size: 0.68rem; }
.alert-raw summary { cursor: pointer; }
.alert-raw pre {
  max-width: min(720px, 80vw);
  max-height: 260px;
  overflow: auto;
  margin: 0.55rem 0 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(1, 9, 12, 0.6);
  font-family: var(--mono);
  font-size: 0.65rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.alert-page-footer { padding: 0 1.15rem 0.9rem; }
.alert-limit-note { color: var(--faint); font-size: 0.72rem; text-align: center; padding: 0.5rem; }
@media (max-width: 900px) {
  .alert-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .alert-filters { grid-template-columns: 1fr; }
  .alert-source { text-align: left; }
  .alert-card-head { flex-direction: column; align-items: start; }
}

.category-navigational { color: #ff9f43; border-color: rgba(255, 159, 67, 0.3); background: rgba(255, 159, 67, 0.06); }
.category-security { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.06); }

/* H3 traffic overlay on Live Map2 */
.traffic-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--line);
  background: rgba(3, 18, 23, 0.32);
}
.traffic-controls[hidden] { display: none; }
.traffic-slider { display: flex; flex: 1 1 340px; flex-direction: column; gap: 0.35rem; min-width: min(340px, 100%); }
.traffic-slider > span { color: var(--muted); font-size: 0.72rem; }
.traffic-slider strong { color: var(--text); font-weight: 650; }
#traffic-hours { width: 100%; accent-color: var(--teal); cursor: pointer; }
.traffic-presets { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.traffic-presets button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0.32rem 0.58rem;
  font-size: 0.69rem;
  font-weight: 650;
  cursor: pointer;
}
.traffic-presets button:hover { color: var(--teal); border-color: rgba(37, 224, 194, 0.35); }
.traffic-presets button.active { color: #04231e; background: var(--teal); border-color: var(--teal); }
.traffic-status { color: var(--muted); font-size: 0.7rem; margin-left: auto; white-space: nowrap; }
.traffic-status.error { color: #ff9c9c; }
.traffic-inline-legend { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.64rem; white-space: nowrap; }
.traffic-inline-legend strong { color: var(--text); font-weight: 650; }
.traffic-gradient {
  display: inline-block;
  width: 112px;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #1d4e89 0%, #2a9d8f 20%, #7bc043 40%, #ffd166 60%, #ff7a45 80%, #ff3d3d 100%);
}
.map-traffic-canvas { position: absolute; inset: 0; z-index: 440; pointer-events: none; }
.map-port-canvas { position: absolute; inset: 0; z-index: 445; pointer-events: none; }
.map-port-tooltip {
  position: absolute;
  z-index: 960;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: 230px;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(5, 24, 30, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  color: var(--muted);
  font-size: 0.68rem;
  pointer-events: none;
}
.map-port-tooltip[hidden] { display: none; }
.map-port-tooltip strong { color: var(--teal); font-size: 0.72rem; }
.map-search-card {
  position: absolute;
  top: 10px;
  left: 52px;
  z-index: 950;
  width: min(330px, calc(100% - 72px));
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(130, 190, 200, 0.28);
  border-radius: 9px;
  background: rgba(5, 24, 30, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}
.map-search-label { display: block; color: var(--teal); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.map-search-input {
  width: 100%;
  min-height: 32px;
  margin-top: 0.25rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(2, 12, 16, 0.55);
  color: var(--text);
  font-size: 0.76rem;
  outline: none;
}
.map-search-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(37, 224, 194, 0.1); }
.map-search-results {
  max-height: 260px;
  overflow: auto;
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.map-search-results[hidden] { display: none; }
.map-search-result {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  width: 100%;
  padding: 0.42rem 0.15rem;
  border: 0;
  border-bottom: 1px solid rgba(140, 196, 210, 0.08);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.map-search-result:last-child { border-bottom: 0; }
.map-search-result:hover { background: rgba(37, 224, 194, 0.06); }
.map-search-result strong { color: var(--text); font-size: 0.74rem; }
.map-search-result span { color: var(--faint); font-size: 0.63rem; }
.map-search-empty { padding: 0.55rem 0.15rem; color: var(--faint); font-size: 0.7rem; }
.traffic-loading {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: rgba(3, 15, 20, 0.55);
  backdrop-filter: blur(2px);
  color: var(--muted);
  font-size: 0.78rem;
  pointer-events: none;
}
.traffic-loading[hidden] { display: none; }
.traffic-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(37, 224, 194, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: traffic-spin 0.8s linear infinite;
}
@keyframes traffic-spin { to { transform: rotate(360deg); } }
.traffic-cell-info {
  position: absolute;
  right: 10px;
  top: 150px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: min(360px, calc(100% - 20px));
  padding: 0.6rem 2rem 0.6rem 0.7rem;
  border: 1px solid rgba(130, 190, 200, 0.28);
  border-radius: 9px;
  background: rgba(5, 24, 30, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}
.traffic-cell-info[hidden] { display: none; }
.traffic-cell-info .eyebrow { margin: 0; font-size: 0.58rem; }
.traffic-cell-info strong { color: var(--text); font-size: 0.78rem; }
.traffic-cell-info > span { color: var(--muted); font-size: 0.68rem; overflow-wrap: anywhere; }
.traffic-cell-close {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 23px;
  height: 23px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.traffic-cell-close:hover { color: var(--text); border-color: var(--line-strong); }
@media (max-width: 700px) {
  .traffic-status { margin-left: 0; }
  .traffic-inline-legend { width: 100%; }
}

/* Maritime news */
.news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1.15rem 1.1rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(6, 24, 31, 0.58);
}
.news-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.news-badges { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.news-source-chip, .news-category-chip {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.news-source-chip { color: var(--teal); border: 1px solid rgba(37, 224, 194, 0.25); background: rgba(37, 224, 194, 0.07); }
.news-category-chip { color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.news-date { color: var(--faint); font-size: 0.64rem; white-space: nowrap; }
.news-card-title { margin: 0; font-size: 0.96rem; line-height: 1.32; letter-spacing: -0.015em; }
.news-card-title a { color: var(--text); text-decoration: none; }
.news-card-title a:hover { color: var(--teal); }
.news-card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.48;
}
.news-card-actions { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 0.25rem; }
@media (max-width: 900px) {
  .news-list { grid-template-columns: 1fr; }
}

/* Marine weather H3 overlay */
.map-weather-canvas { position: absolute; inset: 0; z-index: 435; pointer-events: none; }
.weather-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  padding: 0.65rem 1.15rem;
  border-top: 1px solid var(--line);
  background: rgba(3, 18, 23, 0.28);
}
.weather-controls[hidden] { display: none; }
.weather-legend { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.64rem; }
.weather-gradient {
  display: inline-block;
  width: 130px;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, #1d4e89 0%, #2a9d8f 25%, #ffd166 55%, #ff7a45 78%, #ff3d3d 100%);
}
.weather-status { color: var(--muted); font-size: 0.7rem; margin-left: auto; }
.weather-status.error { color: #ff9c9c; }
@media (max-width: 700px) { .weather-status { margin-left: 0; } }

.map-weather-point-canvas { position: absolute; inset: 0; z-index: 447; pointer-events: none; }
.weather-modal { width: min(620px, calc(100vw - 2rem)); max-height: 90vh; overflow: auto; }
.weather-modal .record-field-wrap { max-height: 55vh; }

.weather-filters {
  padding: 0.65rem 1.15rem 0.8rem;
  border-top: 1px solid var(--line);
  background: rgba(3, 18, 23, 0.22);
}
.weather-filters[hidden] { display: none; }
.weather-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.45rem; color: var(--teal); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.weather-filter-head .toggle { text-transform: none; letter-spacing: 0; font-weight: 500; }
.weather-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem 1rem; }
.weather-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 0.45rem; min-width: 0; }
.weather-filter-toggle { display: inline-flex; align-items: center; gap: 0.32rem; color: var(--muted); font-size: 0.68rem; cursor: pointer; min-width: 0; }
.weather-filter-toggle input { accent-color: var(--teal); }
.weather-filter-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weather-filter input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: #38bdf8; cursor: pointer; }
.weather-filter input[type="range"]:disabled { opacity: 0.35; cursor: default; }
.weather-filter output { color: var(--text); font-family: var(--mono); font-size: 0.62rem; white-space: nowrap; }
@media (max-width: 1000px) { .weather-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .weather-filter-grid { grid-template-columns: 1fr; } }

.land-mask-overlay { filter: saturate(0.4); }
.weather-range { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 0.65rem; }
.weather-range label { display: flex; align-items: center; gap: 0.25rem; min-width: 0; color: var(--faint); font-size: 0.6rem; }
.weather-range input[type="range"] { width: 100%; min-width: 0; accent-color: #38bdf8; cursor: pointer; }
.weather-range input[type="range"]:disabled { opacity: 0.35; cursor: default; }
.weather-range output { color: var(--text); font-family: var(--mono); font-size: 0.58rem; white-space: nowrap; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; padding: 0.65rem 1.15rem; border-top: 1px solid var(--line); }
.table-pagination-actions { display: flex; gap: 0.35rem; }
.table-pagination .button:disabled { opacity: 0.38; cursor: default; }
