:root {
  --ink: #0e2431;
  --muted: #687983;
  --line: #dce5e7;
  --soft: #f2f6f6;
  --paper: #f8faf9;
  --navy: #071923;
  --navy-2: #0b2430;
  --navy-3: #103241;
  --aqua: #18c8a0;
  --aqua-dark: #0d967c;
  --aqua-soft: #dff8f1;
  --amber: #efa844;
  --red: #e35b67;
  --blue: #4c85d9;
  --shadow: 0 18px 50px rgba(9, 32, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(24, 200, 160, 0.32);
  outline-offset: 2px;
}

.eyebrow {
  display: inline-block;
  color: var(--aqua-dark);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.eyebrow.light {
  color: #6ce7c8;
}

.brand-mark {
  align-items: center;
  background: var(--aqua);
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(24, 200, 160, 0.2);
  color: #052019;
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  letter-spacing: -0.05em;
  width: 42px;
}

.brand-mark.compact {
  border-radius: 8px;
  height: 36px;
  width: 36px;
}

.signal-dot,
.status-dot {
  background: #99a7aa;
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.signal-dot {
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(24, 200, 160, 0.11), 0 0 12px rgba(24, 200, 160, 0.45);
}

.signal-dot.bad,
.status-dot.offline {
  background: var(--red);
  box-shadow: none;
}

.status-dot.online {
  background: var(--aqua);
  box-shadow: 0 0 0 3px rgba(24, 200, 160, 0.15);
}

.status-dot.stale {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(239, 168, 68, 0.14);
}

/* Login */

.login-shell {
  display: grid;
  grid-template-columns: minmax(460px, 1.16fr) minmax(420px, 0.84fr);
  min-height: 100vh;
}

.login-visual {
  background:
    radial-gradient(circle at 72% 59%, rgba(26, 184, 151, 0.14), transparent 28%),
    linear-gradient(145deg, #05141d 0%, #09222d 54%, #06151e 100%);
  color: white;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px clamp(38px, 5vw, 74px);
  position: relative;
}

.login-visual::before {
  background-image:
    linear-gradient(rgba(137, 194, 197, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 194, 197, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
  position: absolute;
}

.login-brand,
.sidebar-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.login-brand strong,
.sidebar-brand strong {
  display: block;
  font-size: 1.03rem;
  letter-spacing: -0.03em;
}

.login-brand span,
.sidebar-brand span {
  color: #7f9da8;
  display: block;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  margin-top: 2px;
  text-transform: uppercase;
}

.login-copy {
  max-width: 620px;
  position: relative;
  top: clamp(90px, 15vh, 155px);
  z-index: 3;
}

.login-copy h1 {
  font-size: clamp(2.75rem, 4.7vw, 5rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 20px 0 24px;
}

.login-copy p {
  color: #9bb1b9;
  font-size: clamp(0.95rem, 1.35vw, 1.15rem);
  line-height: 1.7;
  margin: 0;
  max-width: 530px;
}

.radar-scene {
  aspect-ratio: 1;
  bottom: -10vw;
  max-width: 650px;
  min-width: 440px;
  opacity: 0.62;
  position: absolute;
  right: -7vw;
  width: 53vw;
}

.radar-ring {
  border: 1px solid rgba(82, 226, 191, 0.21);
  border-radius: 50%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ring-one { height: 28%; width: 28%; }
.ring-two { height: 58%; width: 58%; }
.ring-three { height: 88%; width: 88%; }

.radar-axis {
  background: rgba(82, 226, 191, 0.13);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.axis-x { height: 1px; width: 94%; }
.axis-y { height: 94%; width: 1px; }

.radar-sweep {
  animation: radar-rotate 7s linear infinite;
  background: conic-gradient(from 22deg, transparent 0 70%, rgba(38, 222, 178, 0.19) 88%, transparent 91%);
  border-radius: 50%;
  height: 87%;
  left: 6.5%;
  position: absolute;
  top: 6.5%;
  width: 87%;
}

@keyframes radar-rotate {
  to { transform: rotate(360deg); }
}

.radar-dot {
  background: #47e1bd;
  border: 4px solid rgba(71, 225, 189, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 17px #36dcb5;
  height: 11px;
  position: absolute;
  width: 11px;
}

.dot-one { left: 34%; top: 28%; }
.dot-two { right: 24%; top: 46%; }
.dot-three { bottom: 21%; left: 43%; }

.radar-vessel {
  background: rgba(5, 26, 34, 0.83);
  border: 1px solid rgba(84, 225, 192, 0.32);
  border-radius: 8px;
  left: 28%;
  padding: 9px 12px;
  position: absolute;
  top: 22%;
}

.radar-vessel span,
.radar-vessel strong {
  display: block;
  font-size: 0.57rem;
}

.radar-vessel span { color: #6fd6bd; letter-spacing: 0.1em; }
.radar-vessel strong { font-family: ui-monospace, monospace; margin-top: 4px; }

.visual-footer {
  align-items: center;
  bottom: 40px;
  color: #75919a;
  display: flex;
  font-family: ui-monospace, monospace;
  font-size: 0.66rem;
  justify-content: space-between;
  left: clamp(38px, 5vw, 74px);
  position: absolute;
  right: clamp(38px, 5vw, 74px);
  z-index: 3;
}

.visual-footer span:first-child {
  align-items: center;
  display: flex;
  gap: 9px;
}

.login-panel {
  background: #fbfcfb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 40px clamp(42px, 6vw, 100px) 28px;
}

.login-form-wrap {
  margin: auto;
  max-width: 440px;
  width: 100%;
}

.login-heading h2 {
  font-size: clamp(2.05rem, 3vw, 2.8rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  margin: 13px 0 10px;
}

.login-heading p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 30px;
}

.login-form {
  display: grid;
  gap: 19px;
}

.login-form label > span,
.endpoint-card label {
  color: #41535c;
  display: block;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.login-form input {
  background: white;
  border: 1px solid #cfdbdd;
  border-radius: 8px;
  color: var(--ink);
  height: 51px;
  padding: 0 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.login-form input:focus {
  border-color: var(--aqua-dark);
  box-shadow: 0 0 0 4px rgba(24, 200, 160, 0.1);
  outline: none;
}

.password-field {
  position: relative;
}

.password-field input { padding-right: 72px; }

.password-field button {
  background: transparent;
  border: 0;
  color: var(--aqua-dark);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 8px;
  position: absolute;
  right: 9px;
  top: 8px;
}

.form-error {
  background: #fff0f1;
  border: 1px solid #f0c8cc;
  border-radius: 7px;
  color: #9e3843;
  font-size: 0.79rem;
  padding: 10px 12px;
}

.primary-button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  font-weight: 750;
  justify-content: center;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover { background: #0d2a37; transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }

.login-button {
  gap: 15px;
  height: 52px;
  margin-top: 3px;
}

.login-button span { color: var(--aqua); font-size: 1.2rem; }

.section-separator {
  align-items: center;
  color: #87969c;
  display: flex;
  font-size: 0.58rem;
  font-weight: 800;
  gap: 12px;
  letter-spacing: 0.16em;
  margin: 27px 0 15px;
}

.section-separator::before,
.section-separator::after {
  background: var(--line);
  content: "";
  flex: 1;
  height: 1px;
}

.demo-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
}

.demo-grid button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: auto 1fr auto;
  padding: 11px;
  text-align: left;
  transition: border 150ms ease, transform 150ms ease;
}

.demo-grid button:hover { border-color: #8dcdbd; transform: translateY(-1px); }

.demo-icon {
  align-items: center;
  background: var(--aqua-soft);
  border-radius: 6px;
  color: var(--aqua-dark);
  display: flex;
  font-size: 0.59rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.demo-grid strong,
.demo-grid small { display: block; }
.demo-grid strong { font-size: 0.72rem; }
.demo-grid small { color: var(--muted); font-size: 0.61rem; margin-top: 3px; }
.demo-grid b { color: #7a8b91; font-size: 0.72rem; }

.demo-note {
  color: #87959a;
  font-size: 0.61rem;
  line-height: 1.45;
  margin: 12px 0 0;
  text-align: center;
}

.login-footer {
  color: #89979c;
  display: flex;
  font-size: 0.58rem;
  justify-content: space-between;
  letter-spacing: 0.02em;
  margin-top: 22px;
}

/* Dashboard shell */

.dashboard-shell {
  background: var(--paper);
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.app-sidebar {
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 16px 14px;
  position: relative;
}

.app-sidebar::after {
  background: linear-gradient(to bottom, rgba(45, 207, 171, 0.08), transparent 35%);
  content: "";
  inset: 0 0 0 auto;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.sidebar-brand { padding: 0 6px 28px; }
.sidebar-brand strong { font-size: 0.93rem; }

.side-nav {
  display: grid;
  gap: 5px;
}

.nav-caption {
  color: #4f6d78;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 5px 10px 10px;
}

.side-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #819aa4;
  cursor: pointer;
  display: grid;
  font-size: 0.75rem;
  font-weight: 650;
  gap: 10px;
  grid-template-columns: 26px 1fr 5px;
  padding: 11px 10px;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.side-nav button:hover { background: rgba(255, 255, 255, 0.035); color: #c3d4d9; }

.side-nav button.active {
  background: linear-gradient(90deg, rgba(24, 200, 160, 0.13), rgba(24, 200, 160, 0.035));
  color: white;
}

.nav-index {
  color: #47636d;
  font-family: ui-monospace, monospace;
  font-size: 0.59rem;
}

.side-nav button.active .nav-index { color: var(--aqua); }

.side-nav button i {
  background: transparent;
  border-radius: 6px;
  height: 14px;
  width: 3px;
}

.side-nav button.active i { background: var(--aqua); box-shadow: 0 0 10px rgba(24, 200, 160, 0.5); }

.sidebar-bottom {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.system-card,
.user-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.027);
  border: 1px solid rgba(160, 203, 209, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  padding: 10px;
}

.system-icon {
  align-items: center;
  background: rgba(24, 200, 160, 0.11);
  border-radius: 6px;
  color: var(--aqua);
  display: flex;
  font-family: ui-monospace, monospace;
  font-size: 0.67rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.system-card strong,
.system-card small,
.user-card strong,
.user-card small { display: block; }
.system-card strong,
.user-card strong { font-size: 0.66rem; }
.system-card small,
.user-card small { color: #607c86; font-size: 0.55rem; margin-top: 3px; }
.system-card small i { margin-right: 5px; }

.user-card {
  background: transparent;
  border-color: transparent;
  color: white;
  cursor: pointer;
  text-align: left;
}

.user-card:hover { background: rgba(255, 255, 255, 0.035); }

.avatar {
  align-items: center;
  background: #183a47;
  border-radius: 50%;
  color: #b6d2d8;
  display: flex;
  font-size: 0.57rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.user-card b { color: #58727b; font-size: 0.8rem; }

.dashboard-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.app-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex: 0 0 60px;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-title {
  align-items: center;
  display: flex;
  gap: 10px;
}

.topbar-title div > span,
.topbar-title div > strong {
  font-size: 0.61rem;
  letter-spacing: 0.12em;
}

.topbar-title div > span { color: #8a999e; }
.topbar-title div > strong { color: #324951; margin-left: 5px; }
.mobile-brand { display: none; }

.topbar-status {
  align-items: center;
  display: flex;
  gap: 20px;
}

.connection-pill,
.live-badge {
  align-items: center;
  display: inline-flex;
  font-size: 0.56rem;
  font-weight: 850;
  gap: 7px;
  letter-spacing: 0.11em;
}

.connection-pill i,
.live-badge i,
.simulation-button i {
  background: var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(24, 200, 160, 0.13);
  height: 6px;
  width: 6px;
}

.connection-pill.error { color: #a2444d; }
.connection-pill.error i { background: var(--red); box-shadow: 0 0 0 3px rgba(227, 91, 103, 0.12); }

.topbar-clock {
  color: #61747b;
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
}

.logout-mobile,
.mobile-tabs { display: none; }

.workspace {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 26px;
}

.map-workspace {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-heading {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 62px;
}

.workspace-heading h1 {
  font-size: clamp(1.65rem, 2.2vw, 2.2rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 5px 0 4px;
}

.workspace-heading p {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0;
}

.heading-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.simulation-button {
  align-items: center;
  background: white;
  border: 1px solid #cbdadc;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 760;
  gap: 9px;
  padding: 9px 12px;
}

.simulation-button:hover { border-color: #8fc7ba; }
.simulation-button.running { background: #e6faf5; border-color: #8bd8c5; color: #087d67; }
.simulation-button.running i { animation: pulse-dot 1.1s infinite; }

@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 7px rgba(24, 200, 160, 0); }
}

.live-badge {
  background: #e5f8f3;
  border: 1px solid #c5ede3;
  border-radius: 5px;
  color: #087763;
  padding: 8px 10px;
}

.map-layout {
  display: grid;
  flex: 1;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 0;
}

.map-card,
.data-card,
.telemetry-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(12, 38, 45, 0.045);
}

.map-card {
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.marine-map-shell {
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marine-map {
  background: #d8e5e4;
  height: 100%;
  position: absolute;
  width: 100%;
}

.maplibregl-map {
  font-family: inherit !important;
}

.maplibregl-canvas { filter: saturate(0.73) contrast(0.96); }
.maplibregl-ctrl-bottom-right { bottom: 66px !important; }
.maplibregl-ctrl-attrib { font-size: 8px !important; opacity: 0.75; }

.map-loading,
.map-error {
  align-items: center;
  background: rgba(237, 244, 243, 0.92);
  color: #486069;
  display: flex;
  font-size: 0.72rem;
  gap: 9px;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 5;
}

.map-loading span {
  animation: map-spin 0.9s linear infinite;
  border: 2px solid #a7c3c0;
  border-radius: 50%;
  border-top-color: var(--aqua-dark);
  height: 18px;
  width: 18px;
}

@keyframes map-spin { to { transform: rotate(360deg); } }

.map-error {
  background: rgba(255, 246, 246, 0.94);
  color: #9c424b;
  padding: 30px;
  text-align: center;
}

.map-tools {
  display: grid;
  gap: 6px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
}

.map-tools button {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d4dfe0;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(10, 36, 42, 0.1);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.map-tools button.active { background: var(--navy); border-color: var(--navy); color: white; }

.map-legend {
  align-items: center;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(204, 218, 220, 0.86);
  border-radius: 5px;
  display: flex;
  gap: 12px;
  left: 12px;
  padding: 7px 10px;
  position: absolute;
  top: 12px;
  z-index: 4;
}

.map-legend span {
  align-items: center;
  color: #596d73;
  display: flex;
  font-size: 0.54rem;
  font-weight: 700;
  gap: 6px;
}

.map-attribution-note {
  bottom: 67px;
  color: rgba(43, 67, 72, 0.72);
  font-size: 0.49rem;
  left: 12px;
  position: absolute;
  text-shadow: 0 1px white;
  z-index: 3;
}

.map-vessel-marker {
  --vessel-color: var(--aqua);
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 36px;
}

.marker-pulse {
  background: color-mix(in srgb, var(--vessel-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--vessel-color) 50%, transparent);
  border-radius: 50%;
  height: 30px;
  position: absolute;
  transition: height 150ms ease, width 150ms ease;
  width: 30px;
}

.map-vessel-marker.online .marker-pulse { animation: vessel-pulse 2.2s infinite; }

@keyframes vessel-pulse {
  70% { height: 38px; opacity: 0; width: 38px; }
  100% { height: 38px; opacity: 0; width: 38px; }
}

.marker-arrow {
  background: var(--vessel-color);
  clip-path: polygon(50% 0, 82% 76%, 50% 62%, 18% 76%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28));
  height: 22px;
  position: relative;
  transition: transform 350ms ease;
  width: 17px;
  z-index: 2;
}

.map-vessel-marker.offline { opacity: 0.48; }
.map-vessel-marker.selected .marker-arrow { filter: drop-shadow(0 0 4px white) drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.map-vessel-marker.selected .marker-pulse { border-width: 2px; height: 36px; width: 36px; }

.marker-label {
  background: rgba(5, 25, 33, 0.89);
  border-radius: 4px;
  color: white;
  font-size: 8px;
  font-weight: 750;
  left: 29px;
  max-width: 110px;
  overflow: hidden;
  padding: 4px 6px;
  pointer-events: none;
  position: absolute;
  text-overflow: ellipsis;
  top: 8px;
  white-space: nowrap;
}

.map-popup { display: grid; gap: 3px; padding: 2px; }
.map-popup strong { color: var(--ink); font-size: 0.73rem; }
.map-popup span { color: var(--muted); font-size: 0.6rem; }

.fleet-dock {
  align-items: stretch;
  backdrop-filter: blur(9px);
  background: rgba(250, 252, 251, 0.94);
  border-top: 1px solid rgba(202, 218, 220, 0.9);
  bottom: 0;
  display: flex;
  height: 56px;
  left: 0;
  overflow-x: auto;
  position: absolute;
  right: 0;
  z-index: 4;
}

.fleet-dock button {
  align-items: center;
  background: transparent;
  border: 0;
  border-right: 1px solid #e0e8e8;
  cursor: pointer;
  display: flex;
  flex: 1 0 150px;
  gap: 9px;
  padding: 8px 12px;
  text-align: left;
}

.fleet-dock button.active { background: rgba(24, 200, 160, 0.08); box-shadow: inset 0 2px var(--aqua); }
.fleet-dock strong,
.fleet-dock small { display: block; }
.fleet-dock strong { font-size: 0.63rem; }
.fleet-dock small { color: #718287; font-family: ui-monospace, monospace; font-size: 0.53rem; margin-top: 3px; }

.telemetry-panel {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.telemetry-panel.empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.telemetry-panel.empty span { color: var(--ink); font-size: 0.8rem; font-weight: 800; }
.telemetry-panel.empty p { font-size: 0.68rem; }

.telemetry-head {
  align-items: center;
  border-bottom: 1px solid #e2e9e9;
  display: flex;
  justify-content: space-between;
  padding: 1px 1px 12px;
}

.telemetry-head > div {
  align-items: center;
  display: flex;
  gap: 9px;
}

.telemetry-head strong,
.telemetry-head small { display: block; }
.telemetry-head strong { font-size: 0.76rem; }
.telemetry-head small { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.5rem; margin-top: 2px; }

.status-label {
  background: #edf1f1;
  border-radius: 4px;
  color: #65787e;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 5px 7px;
}

.status-label.online { background: #ddf7ef; color: #08775f; }
.status-label.stale { background: #fff3dd; color: #9b6519; }
.status-label.offline { background: #ffeaec; color: #a9414a; }

.heading-instrument {
  align-items: center;
  display: grid;
  gap: 15px;
  grid-template-columns: 150px 1fr;
  padding: 17px 0 14px;
}

.compass-dial {
  background: radial-gradient(circle, #102e3a 0 43%, #0a202b 44% 100%);
  border: 1px solid #244653;
  border-radius: 50%;
  box-shadow: inset 0 0 0 6px #0d2732, inset 0 0 0 7px #274653, 0 8px 20px rgba(5, 30, 40, 0.14);
  height: 136px;
  position: relative;
  width: 136px;
}

.compass-dial::before {
  background: repeating-conic-gradient(from -1deg, #77929c 0 1deg, transparent 1deg 10deg);
  border-radius: 50%;
  content: "";
  inset: 8px;
  mask: radial-gradient(circle, transparent 0 76%, black 77%);
  opacity: 0.53;
  position: absolute;
}

.compass-dial > span {
  color: #6f909b;
  font-size: 0.48rem;
  font-weight: 800;
  position: absolute;
}

.compass-n { left: 50%; top: 11px; transform: translateX(-50%); }
.compass-s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 12px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 11px; top: 50%; transform: translateY(-50%); }

.compass-arrow {
  background: linear-gradient(to bottom, var(--aqua) 0 58%, rgba(231, 247, 244, 0.4) 59%);
  clip-path: polygon(50% 0, 68% 67%, 50% 58%, 32% 67%);
  height: 47px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform-origin: 50% 83%;
  transition: transform 350ms ease;
  width: 16px;
  z-index: 1;
}

.compass-dial > div {
  color: white;
  left: 50%;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -28%);
  z-index: 2;
}

.compass-dial > div strong { display: block; font-family: ui-monospace, monospace; font-size: 1.04rem; }
.compass-dial > div span { color: #71909a; display: block; font-size: 0.43rem; font-weight: 800; margin-top: 1px; }

.instrument-values {
  display: grid;
  gap: 10px;
}

.instrument-values > div {
  border-left: 2px solid #d9e3e3;
  padding-left: 10px;
}

.instrument-values span,
.instrument-values strong,
.instrument-values small { display: block; }
.instrument-values span { color: #86969b; font-size: 0.48rem; font-weight: 800; letter-spacing: 0.1em; }
.instrument-values strong { font-family: ui-monospace, monospace; font-size: 1.02rem; margin: 2px 0; }
.instrument-values small { color: #849298; font-size: 0.5rem; }

.position-block,
.destination-block,
.nmea-health {
  border-top: 1px solid #e2e9e9;
  padding: 12px 1px;
}

.panel-caption {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-caption span,
.panel-caption b {
  color: #829198;
  font-size: 0.49rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.panel-caption b { color: var(--aqua-dark); font-family: ui-monospace, monospace; letter-spacing: 0.04em; }

.position-block > div:not(.panel-caption) {
  align-items: center;
  background: var(--soft);
  border-bottom: 1px solid white;
  display: flex;
  justify-content: space-between;
  padding: 8px 9px;
}

.position-block > div:not(.panel-caption) span { color: #7d8d93; font-size: 0.49rem; font-weight: 800; }
.position-block > div:not(.panel-caption) strong { font-family: ui-monospace, monospace; font-size: 0.68rem; }

.destination-row {
  align-items: center;
  display: flex;
  margin: 4px 0 8px;
}

.destination-row > span {
  align-items: center;
  border: 1px solid #bdd2d3;
  border-radius: 50%;
  color: #6d8187;
  display: flex;
  font-size: 0.42rem;
  font-weight: 900;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.destination-row .route-destination { background: var(--aqua); border-color: var(--aqua); color: #042b22; }

.destination-row i {
  border-top: 1px dashed #98b3b3;
  flex: 1;
  position: relative;
}

.destination-row i::after { background: var(--aqua); border-radius: 50%; content: ""; height: 5px; position: absolute; right: 20%; top: -3px; width: 5px; }
.destination-block > strong { display: block; font-size: 0.72rem; }
.destination-block > small { color: #7b8c92; display: block; font-size: 0.54rem; margin-top: 3px; }

.nmea-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.nmea-tags span { background: #e4f6f1; border: 1px solid #c9ebe2; border-radius: 4px; color: #087961; font-family: ui-monospace, monospace; font-size: 0.5rem; font-weight: 800; padding: 4px 6px; }
.signal-details { display: flex; gap: 14px; margin-top: 10px; }
.signal-details span { color: #839197; font-size: 0.5rem; }
.signal-details strong { color: #40545b; font-family: ui-monospace, monospace; }

.raw-nmea {
  border-top: 1px solid #e2e9e9;
  margin-top: 1px;
  padding-top: 10px;
}

.raw-nmea summary {
  color: #52666d;
  cursor: pointer;
  display: flex;
  font-size: 0.57rem;
  font-weight: 750;
  justify-content: space-between;
  list-style: none;
  padding: 2px 0;
}

.raw-nmea pre,
.endpoint-card pre {
  background: #071d27;
  border-radius: 6px;
  color: #70d9bf;
  font-family: ui-monospace, monospace;
  font-size: 0.49rem;
  line-height: 1.55;
  margin: 9px 0 0;
  max-height: 90px;
  overflow: auto;
  padding: 9px;
  white-space: pre-wrap;
}

/* Lists, history and devices */

.list-workspace,
.history-workspace,
.devices-workspace { padding-bottom: 40px; }

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 15px;
}

.summary-grid article,
.history-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 17px;
}

.summary-grid span,
.history-summary span { color: #819096; display: block; font-size: 0.5rem; font-weight: 850; letter-spacing: 0.12em; }
.summary-grid strong,
.history-summary strong { display: block; font-family: ui-monospace, monospace; font-size: 1.65rem; font-weight: 560; margin: 10px 0 4px; }
.summary-grid strong.good { color: var(--aqua-dark); }
.summary-grid small,
.history-summary small { color: #809096; display: block; font-size: 0.55rem; }

.data-card { overflow: hidden; }

.data-card-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 61px;
  padding: 12px 16px;
}

.data-card-head h2 { font-size: 0.98rem; letter-spacing: -0.025em; margin: 3px 0 0; }
.data-card-head > span { color: #7d8c92; font-size: 0.58rem; }
.table-scroll { overflow-x: auto; }

.fleet-table {
  border-collapse: collapse;
  min-width: 870px;
  width: 100%;
}

.fleet-table th {
  background: #f3f6f6;
  color: #7b8b91;
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  padding: 10px 13px;
  text-align: left;
  text-transform: uppercase;
}

.fleet-table td {
  border-top: 1px solid #e8eeee;
  color: #344a52;
  font-size: 0.65rem;
  padding: 11px 13px;
  vertical-align: middle;
}

.fleet-table tbody tr:hover { background: #fbfdfc; }
.fleet-table td > strong { display: block; font-size: 0.64rem; }
.muted { color: #89979c; display: block; font-size: 0.52rem; margin-top: 3px; }
.mono { font-family: ui-monospace, monospace; }

.vessel-cell { align-items: center; display: flex; gap: 10px; }
.vessel-cell > span { align-items: center; border-radius: 6px; color: #08251e; display: flex; font-size: 0.54rem; font-weight: 900; height: 32px; justify-content: center; width: 32px; }
.vessel-cell strong,
.vessel-cell small { display: block; }
.vessel-cell strong { color: #19303a; font-size: 0.7rem; }
.vessel-cell small { color: #849399; font-family: ui-monospace, monospace; font-size: 0.5rem; margin-top: 2px; }

.table-status {
  align-items: center;
  display: inline-flex;
  font-size: 0.5rem;
  font-weight: 850;
  gap: 6px;
  letter-spacing: 0.05em;
}

.table-status i { background: #9aa7aa; border-radius: 50%; height: 6px; width: 6px; }
.table-status.online { color: #087860; }
.table-status.online i { background: var(--aqua); }
.table-status.stale { color: #9a651a; }
.table-status.stale i { background: var(--amber); }
.table-status.offline { color: #a3434c; }
.table-status.offline i { background: var(--red); }

.row-action {
  background: transparent;
  border: 0;
  color: var(--aqua-dark);
  cursor: pointer;
  font-size: 0.59rem;
  font-weight: 800;
  white-space: nowrap;
}

.vessel-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 13px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.vessel-switcher button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  font-size: 0.61rem;
  font-weight: 750;
  gap: 8px;
  padding: 8px 11px;
}

.vessel-switcher button.active { background: #e9f9f5; border-color: #8fd2c2; color: #087963; }

.history-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 0.7fr);
  margin-bottom: 13px;
}

.history-map { height: 360px; }
.history-summary { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.history-summary article { min-height: 0; padding: 14px; }
.history-summary strong { font-size: 1.3rem; }
.history-log { margin-top: 13px; }

.integration-flow {
  align-items: stretch;
  background: var(--navy);
  border-radius: 10px;
  color: white;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  margin-bottom: 14px;
  padding: 14px;
}

.integration-flow > div {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(146, 202, 208, 0.1);
  border-radius: 7px;
  padding: 11px;
}

.integration-flow > i { align-self: center; color: var(--aqua); font-style: normal; }
.integration-flow span { color: var(--aqua); display: block; font-family: ui-monospace, monospace; font-size: 0.52rem; }
.integration-flow strong { display: block; font-size: 0.68rem; margin: 5px 0 3px; }
.integration-flow small { color: #71909a; display: block; font-size: 0.52rem; }

.device-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.85fr) minmax(370px, 1.15fr);
}

.device-list { display: grid; }
.device-list article { align-items: center; border-top: 1px solid #e7eeee; display: grid; gap: 11px; grid-template-columns: auto 1fr auto; padding: 13px 16px; }
.device-list article:first-child { border-top: 0; }
.device-status-icon { align-items: center; background: #eff5f4; border-radius: 7px; display: flex; height: 34px; justify-content: center; width: 34px; }
.device-list strong,
.device-list span,
.device-list code { display: block; }
.device-list strong { font-size: 0.69rem; }
.device-list span { color: #7d8d92; font-family: ui-monospace, monospace; font-size: 0.51rem; margin: 2px 0 5px; }
.device-list code { color: #0a8068; font-size: 0.54rem; }
.device-meta { text-align: right; }
.device-meta span { color: #087860; font-family: inherit; font-size: 0.49rem; font-weight: 850; }
.device-meta small { color: #87969b; font-size: 0.5rem; }

.endpoint-card { padding-bottom: 15px; }
.endpoint-card > label,
.endpoint-card > code,
.endpoint-card > pre,
.endpoint-card > p { margin-left: 16px; margin-right: 16px; }
.endpoint-card > label { margin-top: 14px; }
.secure-tag { background: #ddf7ef; border-radius: 4px; color: #087860 !important; font-size: 0.5rem !important; font-weight: 900; padding: 5px 7px; }
.endpoint-code { background: #edf4f3; border: 1px solid #d8e4e4; border-radius: 5px; color: #1e4d4c; display: block; font-family: ui-monospace, monospace; font-size: 0.6rem; overflow-x: auto; padding: 9px; white-space: nowrap; }
.endpoint-card pre { max-height: none; }
.endpoint-note { background: #fff7e9; border: 1px solid #f2dcba; border-radius: 6px; color: #785b2f; font-size: 0.59rem; line-height: 1.5; padding: 9px 10px; }

.safety-banner {
  align-items: center;
  background: #edf6f5;
  border: 1px solid #d0e3e1;
  border-radius: 9px;
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 15px;
}

.safety-banner > span { align-items: center; background: #d7ece8; border-radius: 50%; color: #25675d; display: flex; font-weight: 900; height: 29px; justify-content: center; width: 29px; }
.safety-banner strong { display: block; font-size: 0.68rem; }
.safety-banner p { color: #708286; font-size: 0.56rem; margin: 3px 0 0; }

.app-loading {
  align-items: center;
  background: var(--navy);
  color: #aac0c7;
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  gap: 12px;
  justify-content: center;
  min-height: 100vh;
}

.loading-orbit {
  animation: map-spin 1s linear infinite;
  border: 2px solid #25434e;
  border-radius: 50%;
  border-top-color: var(--aqua);
  height: 28px;
  width: 28px;
}

@media (max-width: 1180px) {
  .dashboard-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .map-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .heading-instrument { grid-template-columns: 125px 1fr; }
  .compass-dial { height: 116px; width: 116px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .history-grid { grid-template-columns: 1fr; }
  .history-summary { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
  .login-shell { display: block; }
  .login-visual { min-height: 410px; padding: 30px 34px; }
  .login-copy { top: 75px; }
  .login-copy h1 { font-size: 3rem; }
  .login-copy p { max-width: 500px; }
  .radar-scene { bottom: -280px; right: -140px; width: 650px; }
  .visual-footer { bottom: 26px; left: 34px; right: 34px; }
  .login-panel { min-height: auto; padding: 50px 28px 24px; }
  .login-form-wrap { max-width: 500px; }

  .dashboard-shell { display: block; height: 100dvh; }
  .app-sidebar { display: none; }
  .app-topbar { flex: 0 0 57px; padding: 0 14px; }
  .mobile-brand { align-items: center; background: var(--aqua); border-radius: 5px; color: #052019; display: flex; font-size: 0.55rem; font-weight: 900; height: 27px; justify-content: center; width: 27px; }
  .mobile-tabs { display: flex; gap: 3px; }
  .mobile-tabs button { background: transparent; border: 0; border-radius: 5px; color: #7c8b90; cursor: pointer; font-size: 0.52rem; font-weight: 850; padding: 7px; }
  .mobile-tabs button.active { background: #e5f7f2; color: #087861; }
  .topbar-title div { display: none; }
  .topbar-status { gap: 9px; }
  .topbar-clock { display: none; }
  .logout-mobile { background: transparent; border: 0; color: #697b81; cursor: pointer; display: block; font-size: 0.56rem; font-weight: 800; }
  .workspace { padding: 17px 16px 22px; }
  .map-workspace { overflow: auto; }
  .map-layout { display: grid; flex: initial; grid-template-columns: 1fr; min-height: auto; }
  .map-card { height: 58vh; min-height: 420px; }
  .telemetry-panel { overflow: visible; }
  .device-layout { grid-template-columns: 1fr; }
  .integration-flow { grid-template-columns: 1fr; }
  .integration-flow > i { display: none; }
}

@media (max-width: 640px) {
  .login-visual { min-height: 360px; padding: 25px 22px; }
  .login-copy { top: 62px; }
  .login-copy h1 { font-size: 2.35rem; margin: 14px 0 16px; }
  .login-copy p { font-size: 0.84rem; line-height: 1.55; }
  .radar-scene { display: none; }
  .visual-footer { bottom: 20px; left: 22px; right: 22px; }
  .visual-footer span:last-child { display: none; }
  .login-panel { padding: 40px 20px 22px; }
  .login-heading h2 { font-size: 2rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .login-footer { display: grid; gap: 5px; text-align: center; }

  .connection-pill { font-size: 0; gap: 0; padding: 8px; }
  .connection-pill i { display: block; }
  .mobile-tabs { max-width: 62vw; overflow-x: auto; }
  .workspace-heading { align-items: flex-start; gap: 10px; }
  .workspace-heading h1 { font-size: 1.55rem; }
  .workspace-heading p { max-width: 250px; }
  .heading-actions { flex-direction: column-reverse; gap: 6px; align-items: flex-end; }
  .live-badge { display: none; }
  .simulation-button { font-size: 0.56rem; padding: 8px 9px; }
  .map-card { height: 52vh; min-height: 370px; }
  .map-legend { gap: 8px; }
  .map-legend span { font-size: 0; gap: 0; }
  .map-legend span i { display: block; }
  .fleet-dock { height: 52px; }
  .map-attribution-note { bottom: 62px; }
  .maplibregl-ctrl-bottom-right { bottom: 59px !important; }
  .heading-instrument { grid-template-columns: 135px 1fr; }
  .compass-dial { height: 126px; width: 126px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid article { padding: 13px; }
  .summary-grid strong { font-size: 1.35rem; }
  .history-summary { grid-template-columns: 1fr 1fr; }
  .history-map { height: 320px; }
  .device-layout { grid-template-columns: minmax(0, 1fr); }
  .device-list article { grid-template-columns: auto 1fr; }
  .device-meta { display: none; }
  .safety-banner { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* cPanel SPA additions */

[hidden] {
  display: none !important;
}

body {
  overscroll-behavior: none;
}

.noscript-message {
  background: #fff1d9;
  border-bottom: 1px solid #edcf9f;
  color: #684815;
  font-size: 0.82rem;
  padding: 12px 18px;
  text-align: center;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.password-field {
  display: block;
}

.login-button .button-label {
  color: white;
  font-size: inherit;
}

.login-button b {
  color: var(--aqua);
  font-size: 1.2rem;
}

.connection-pill.loading {
  color: #73858c;
}

.connection-pill.loading i {
  animation: pulse-dot 1.1s infinite;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(239, 168, 68, 0.14);
}

.connection-pill.offline {
  color: #a2444d;
}

.connection-pill.offline i {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 91, 103, 0.12);
}

.workspace[aria-busy="true"]::after {
  background: linear-gradient(90deg, transparent, rgba(24, 200, 160, 0.18), transparent);
  content: "";
  height: 2px;
  left: 0;
  position: fixed;
  right: 0;
  top: 59px;
  z-index: 15;
  animation: loading-scan 1.25s ease-in-out infinite;
}

@keyframes loading-scan {
  from { transform: translateX(-75%); }
  to { transform: translateX(75%); }
}

.empty-state {
  align-items: center;
  color: #718187;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.empty-state .empty-icon {
  align-items: center;
  background: var(--aqua-soft);
  border-radius: 50%;
  color: var(--aqua-dark);
  display: flex;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.empty-state p {
  font-size: 0.67rem;
  line-height: 1.55;
  margin: 0;
  max-width: 390px;
}

.toast-region {
  bottom: 22px;
  display: grid;
  gap: 8px;
  max-width: min(390px, calc(100vw - 32px));
  pointer-events: none;
  position: fixed;
  right: 22px;
  z-index: 9999;
}

.toast {
  animation: toast-in 220ms ease-out;
  background: #08212c;
  border: 1px solid rgba(119, 190, 192, 0.2);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(4, 20, 27, 0.24);
  color: #d9e8eb;
  font-size: 0.67rem;
  line-height: 1.45;
  padding: 11px 13px;
}

.toast.error {
  background: #5e2028;
  border-color: rgba(255, 200, 207, 0.2);
}

.toast.success {
  background: #075e4f;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.map-canvas-host {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.maplibregl-popup-content {
  border-radius: 7px !important;
  box-shadow: 0 10px 28px rgba(7, 30, 37, 0.15) !important;
  padding: 9px 11px !important;
}

.map-vessel-marker:focus-visible {
  border-radius: 50%;
  outline: 3px solid rgba(24, 200, 160, 0.42);
}

.map-tools button span {
  font-family: ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.history-controls {
  align-items: center;
  display: flex;
  gap: 8px;
}

.history-controls button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #557078;
  cursor: pointer;
  font-size: 0.56rem;
  font-weight: 800;
  padding: 7px 9px;
}

.history-controls button:hover {
  border-color: #8dcdbd;
  color: var(--aqua-dark);
}

.history-log .empty-state {
  min-height: 150px;
}

.device-key {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-copy-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 16px;
}

.api-copy-row .endpoint-code {
  margin: 0;
}

.copy-button {
  background: white;
  border: 1px solid #cbdadc;
  border-radius: 6px;
  color: var(--aqua-dark);
  cursor: pointer;
  font-size: 0.55rem;
  font-weight: 850;
  padding: 9px 10px;
}

.copy-button:hover {
  border-color: #8fc7ba;
}

.role-lock {
  align-items: center;
  background: rgba(24, 200, 160, 0.08);
  border: 1px solid rgba(24, 200, 160, 0.13);
  border-radius: 7px;
  color: #7b999f;
  display: flex;
  font-size: 0.54rem;
  gap: 8px;
  line-height: 1.4;
  padding: 9px 10px;
}

.role-lock strong {
  color: #d2e2e5;
  display: block;
  font-size: 0.59rem;
}

.vessel-mode .workspace-heading h1 {
  max-width: 680px;
}

.metric-empty {
  color: #9aabab;
}

@media (max-width: 960px) {
  .toast-region {
    bottom: 14px;
    right: 14px;
  }

  .history-controls {
    display: none;
  }
}

@media (max-width: 640px) {
  .workspace-heading {
    min-height: 72px;
  }

  .heading-actions .simulation-button {
    max-width: 142px;
  }

  .api-copy-row {
    grid-template-columns: 1fr;
  }

  .copy-button {
    justify-self: start;
  }
}

/* Administración de usuarios */
.users-workspace {
  overflow: auto;
}

.users-admin-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  margin-bottom: 14px;
}

.user-create-card,
.security-card,
.users-list-card {
  padding: 18px;
}

.admin-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-form label {
  display: grid;
  gap: 6px;
}

.admin-form label > span {
  color: #52666e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.admin-form label small {
  color: #94a0a5;
  font-size: 0.62rem;
  font-weight: 650;
}

.admin-form input,
.admin-form select {
  background: #fbfcfc;
  border: 1px solid #cedadd;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  outline: 0;
  padding: 9px 11px;
  width: 100%;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: var(--aqua-dark);
  box-shadow: 0 0 0 3px rgba(24, 200, 160, 0.12);
}

.form-help {
  background: #f5f8f8;
  border-left: 3px solid var(--aqua);
  color: #61757c;
  font-size: 0.72rem;
  line-height: 1.5;
  margin: 0;
  padding: 9px 11px;
}

.compact-action,
.mini-action,
.secondary-button,
.danger-button {
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.compact-action {
  min-height: 42px;
  padding: 10px 15px;
}

.secondary-button {
  background: white;
  border: 1px solid #cbd8db;
  color: var(--ink);
}

.secondary-button:hover { background: #f3f7f7; }

.danger-button {
  background: #fff3f4;
  border: 1px solid #efc7cb;
  color: #ae3f4b;
}

.danger-button:hover { background: #ffe8ea; }

.delete-account-button {
  margin-left: auto;
}

.danger-solid-button {
  background: #b42335;
  border: 1px solid #a01f30;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.danger-solid-button:hover { background: #971d2c; }
.danger-solid-button:disabled { cursor: wait; opacity: .62; }

.confirmation-modal-backdrop {
  align-items: center;
  background: rgba(5, 20, 28, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 9999;
}

.confirmation-modal {
  background: white;
  border: 1px solid #e4d8da;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  display: grid;
  gap: 16px;
  max-width: 520px;
  padding: 22px;
  width: min(100%, 520px);
}

.confirmation-modal-icon {
  align-items: center;
  background: #fff0f2;
  border: 1px solid #f0c6cc;
  border-radius: 50%;
  color: #b42335;
  display: flex;
  font-size: 1.25rem;
  font-weight: 950;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.confirmation-modal-copy h2 {
  font-size: 1.28rem;
  margin: 5px 0 8px;
}

.confirmation-modal-copy p {
  color: #5d7076;
  font-size: .76rem;
  line-height: 1.55;
  margin: 6px 0;
}

.confirmation-modal-copy code {
  background: #f2f5f5;
  border-radius: 4px;
  color: #24444a;
  padding: 2px 5px;
}

.danger-eyebrow { color: #a72b3a; }

.confirmation-safe-note {
  background: #f4f9f7;
  border-left: 3px solid var(--aqua);
  border-radius: 5px;
  padding: 9px 10px;
}

.confirmation-modal-form { gap: 12px; }
.confirmation-modal-actions { display: flex; gap: 9px; justify-content: flex-end; }

.mini-action {
  min-height: 36px;
  padding: 7px 11px;
}

.admin-users-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-user-card {
  background: #fbfcfc;
  border: 1px solid #dce5e7;
  border-radius: 10px;
  overflow: hidden;
  padding: 14px;
}

.admin-user-summary {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.admin-user-avatar {
  align-items: center;
  background: var(--navy);
  border-radius: 9px;
  color: var(--aqua);
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.admin-user-title {
  display: grid;
  min-width: 0;
}

.admin-user-title strong {
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-title span,
.admin-user-title small {
  color: #74858b;
  font-size: 0.67rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status {
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 7px 9px;
}

.account-status.approved {
  background: #e4f8f2;
  color: #087763;
}

.account-status.pending {
  background: #fff5e7;
  color: #9f6a1c;
}

.account-status.suspended {
  background: #fff0f1;
  color: #a13c47;
}

.inline-admin-form {
  border-top: 1px solid #e2e9eb;
  grid-template-columns: 1fr 1.1fr 1.1fr auto;
  margin-top: 13px;
  padding-top: 13px;
}

.user-actions {
  align-items: end;
  display: flex;
  gap: 7px;
}

.password-reset-box {
  border-top: 1px dashed #d9e2e4;
  margin-top: 12px;
  padding-top: 10px;
}

.password-reset-box summary {
  color: #597078;
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 800;
}

.password-inline {
  align-items: end;
  grid-template-columns: 1fr 1fr auto;
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .users-admin-grid { grid-template-columns: 1fr; }
  .inline-admin-form { grid-template-columns: 1fr 1fr; }
  .user-actions { align-items: center; }
}

@media (max-width: 700px) {
  .users-admin-grid { display: block; }
  .security-card { margin-top: 12px; }
  .inline-admin-form,
  .password-inline { grid-template-columns: 1fr; }
  .admin-user-summary { grid-template-columns: 40px minmax(0, 1fr); }
  .account-status { grid-column: 2; justify-self: start; }
  .user-actions { flex-wrap: wrap; }
}

/* Centro de dispositivos y telemetría operativa 3.0 */

.status-dot.nofix {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(76, 133, 217, 0.15);
}

.nav-count,
.mobile-nav-count {
  align-items: center;
  background: var(--amber);
  border-radius: 999px;
  color: #342108;
  display: inline-flex;
  font-style: normal;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  margin-left: 7px;
  min-height: 18px;
  min-width: 18px;
  padding: 3px 5px;
}

.mobile-nav-count {
  font-size: 0.45rem;
  margin-left: 4px;
  min-height: 15px;
  min-width: 15px;
}

.operational-alerts {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: -5px 0 12px;
  overflow-x: auto;
}

.operational-alert {
  align-items: center;
  background: #f0f6fb;
  border: 1px solid #d4e2ef;
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  display: flex;
  flex: 1 0 220px;
  gap: 7px;
  max-width: 420px;
  padding: 8px 10px;
}

.operational-alert.warning {
  background: #fff8eb;
  border-color: #efdfbf;
  border-left-color: var(--amber);
}

.operational-alert.critical {
  background: #fff1f2;
  border-color: #f1d0d3;
  border-left-color: var(--red);
}

.operational-alert strong {
  font-size: 0.58rem;
  white-space: nowrap;
}

.operational-alert span {
  color: #718087;
  font-size: 0.53rem;
}

.telemetry-alert {
  background: #eef5fb;
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 8px 9px;
}

.telemetry-alert.warning { background: #fff7e8; border-left-color: var(--amber); }
.telemetry-alert.critical { background: #ffeff1; border-left-color: var(--red); }
.telemetry-alert.clear { background: #eaf8f4; border-left-color: var(--aqua); }
.telemetry-alert strong { font-size: 0.58rem; }
.telemetry-alert span { color: #6e7f85; font-size: 0.51rem; line-height: 1.4; }

.status-label.nofix { background: #e8f0fb; color: #3269ae; }
.table-status.nofix { color: #3269ae; }
.table-status.nofix i { background: var(--blue); }
.map-vessel-marker.nofix .marker-pulse { border-color: rgba(76, 133, 217, 0.65); }
.map-vessel-marker.offline { opacity: 0.48; }

.marker-cog-arrow {
  background: repeating-linear-gradient(to bottom, #2474cf 0 4px, transparent 4px 7px);
  bottom: 18px;
  height: 29px;
  left: calc(50% - 1px);
  position: absolute;
  transform-origin: 50% 100%;
  transition: transform 350ms ease;
  width: 2px;
  z-index: 1;
}

.marker-cog-arrow::before {
  border-bottom: 5px solid #2474cf;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  content: "";
  left: -2px;
  position: absolute;
  top: -1px;
}

.heading-metric { border-left-color: var(--aqua) !important; }
.cog-metric { border-left-color: var(--blue) !important; }
.signal-details { flex-wrap: wrap; row-gap: 6px; }
.quality-good { color: var(--aqua-dark) !important; }
.quality-fair { color: #6c7e84 !important; }
.quality-warning,
.quality-poor { color: #a56612 !important; }
.quality-nofix { color: #a33e49 !important; }

.last-reception {
  border-top: 1px dashed #dce5e6;
  color: #7c8c91;
  font-size: 0.5rem;
  margin: 10px 0 0;
  padding-top: 8px;
}

.last-reception strong { color: #40545b; font-family: ui-monospace, monospace; }
.summary-grid strong.alert-value { color: var(--red); }

.device-summary { margin-bottom: 14px; }
.device-summary .device-summary-pending { border-top: 3px solid var(--amber); }
.device-summary .device-summary-approved { border-top: 3px solid var(--aqua); }
.device-summary .device-summary-rejected { border-top: 3px solid var(--red); }
.device-summary .device-summary-disabled { border-top: 3px solid #829197; }

.registry-notice {
  align-items: center;
  background: #edf8f5;
  border: 1px solid #cae9e1;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.registry-notice.warning { background: #fff7e9; border-color: #edd9b5; }
.registry-notice strong { font-size: 0.63rem; white-space: nowrap; }
.registry-notice span { color: #697c82; font-size: 0.58rem; line-height: 1.45; }

.device-filters {
  border-bottom: 1px solid #e2e9ea;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 10px 12px;
}

.device-filters button {
  align-items: center;
  background: #f3f6f6;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #60747b;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.54rem;
  font-weight: 800;
  gap: 5px;
  padding: 6px 8px;
}

.device-filters button span {
  background: white;
  border-radius: 999px;
  color: #7a8a90;
  min-width: 17px;
  padding: 2px 4px;
  text-align: center;
}

.device-filters button.active {
  background: #e4f7f2;
  border-color: #a8dfd1;
  color: #087960;
}

.device-registry-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding: 12px;
}

.registry-device-card {
  background: #fbfcfc;
  border: 1px solid #dfe7e8;
  border-left: 3px solid #94a2a7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.registry-device-card.status-pending { border-left-color: var(--amber); }
.registry-device-card.status-approved { border-left-color: var(--aqua); }
.registry-device-card.status-rejected { border-left-color: var(--red); }

.registry-device-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.registry-color {
  align-items: center;
  border-radius: 7px;
  color: #071923;
  display: flex;
  font-size: 0.54rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.registry-device-head strong,
.registry-device-head code { display: block; }
.registry-device-head strong { font-size: 0.72rem; }
.registry-device-head code { color: #71838a; font-size: 0.53rem; margin-top: 2px; }

.registry-status {
  border-radius: 999px;
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 5px 7px;
}

.registry-status.pending { background: #fff2d9; color: #956012; }
.registry-status.approved { background: #dff7f0; color: #08775f; }
.registry-status.rejected { background: #ffeaec; color: #a33d48; }
.registry-status.disabled { background: #edf1f1; color: #687a80; }

.registry-live-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.registry-live-row > span {
  align-items: center;
  color: #819096;
  display: inline-flex;
  font-size: 0.49rem;
  gap: 6px;
}

.registry-live-row strong { color: #40555d; font-family: ui-monospace, monospace; }

.registry-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 75px;
}

.registry-fields label { display: grid; gap: 4px; }
.registry-fields label > span { color: #75878d; font-size: 0.48rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.registry-fields input { background: white; border: 1px solid #cfdbdd; border-radius: 6px; color: var(--ink); font-size: 0.64rem; min-height: 37px; padding: 7px 9px; width: 100%; }
.registry-fields input[type="color"] { cursor: pointer; padding: 4px; }
.registry-fields input:disabled { background: #eef2f2; color: #839298; cursor: not-allowed; }
.registry-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.registry-actions button:disabled { cursor: not-allowed; opacity: 0.55; }

.registry-security {
  align-items: center;
  border-top: 1px dashed #dce5e6;
  color: #718288;
  display: flex;
  font-size: 0.49rem;
  justify-content: space-between;
  padding-top: 8px;
}

.registry-security strong { color: #40555d; font-family: ui-monospace, monospace; }
.registry-security small { font-size: 0.47rem; }

.one-time-key {
  background: #fff7df;
  border: 1px solid #e9d397;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.one-time-key strong { color: #715216; font-size: 0.62rem; }
.one-time-key code { background: white; border: 1px solid #e0d6b8; border-radius: 5px; color: #443816; font-size: 0.58rem; overflow-wrap: anywhere; padding: 8px; }
.one-time-key button { background: #715216; border: 0; border-radius: 5px; color: white; cursor: pointer; font-size: 0.54rem; font-weight: 800; justify-self: start; padding: 7px 9px; }
.one-time-key small { color: #86754c; font-size: 0.48rem; }

@media (max-width: 960px) {
  .device-registry-list { max-height: none; }
}

@media (max-width: 640px) {
  .operational-alerts { margin-top: 0; }
  .operational-alert { align-items: flex-start; display: grid; }
  .registry-notice { align-items: flex-start; display: grid; }
  .registry-device-head { grid-template-columns: 36px minmax(0, 1fr); }
  .registry-status { grid-column: 2; justify-self: start; }
  .registry-fields { grid-template-columns: minmax(0, 1fr) 64px; }
  .registry-security { align-items: flex-start; display: grid; gap: 3px; }
}

/* 3.0 operational readability and live-state refinements */
.connection-pill.loading,
.live-badge.not-live.loading { color: #5e747b; }

.connection-pill.offline,
.live-badge.not-live.offline { color: #a33f49; }

.connection-pill.offline i,
.live-badge.not-live.offline i { background: var(--red); box-shadow: 0 0 0 3px rgba(227, 91, 103, 0.12); }

.live-badge.not-live.error { background: #fff2dc; border-color: #ecd3a4; color: #936018; }
.live-badge.not-live.error i { background: var(--amber); box-shadow: 0 0 0 3px rgba(218, 153, 43, 0.14); }
.live-badge b { font: inherit; }

.telemetry-head small,
.instrument-values small,
.signal-details span,
.nmea-tags span,
.nmea-tags em,
.destination-block > small,
.raw-nmea pre,
.endpoint-card pre,
.muted,
.vessel-cell small,
.history-summary span,
.integration-flow span,
.integration-flow small,
.device-meta small,
.registry-notice span,
.registry-device-head code,
.registry-live-row > span,
.registry-security,
.registry-security small,
.one-time-key small {
  font-size: 0.64rem;
  line-height: 1.42;
}

.status-label,
.registry-status,
.registry-fields label > span,
.panel-caption span,
.panel-caption b,
.position-block > div:not(.panel-caption) span,
.instrument-values span,
.compass-dial > span,
.compass-dial > div span,
.destination-row > span,
.secure-tag,
.device-filters button,
.one-time-key button,
.mobile-tabs button {
  font-size: 0.62rem !important;
}

.raw-nmea summary,
.registry-notice strong,
.registry-fields input,
.one-time-key code { font-size: 0.68rem; }

.nmea-tags em {
  color: #75878d;
  font-style: normal;
  padding: 4px 0;
}

.assignment-disabled,
.muted.offline { color: #a33f49 !important; font-weight: 800; }
.muted.stale { color: #98631a !important; font-weight: 800; }
.muted.nofix { color: #9a661a !important; font-weight: 800; }

.confirmation-modal :focus-visible {
  outline: 3px solid rgba(24, 200, 160, 0.42);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .mobile-tabs button { min-height: 36px; }
  .registry-actions .mini-action,
  .device-filters button { min-height: 34px; }
}
