/* COMPASS+ · Hoja consolidada. Secciones en orden original de cascada. */

/* ========== style.css ========== */
/* COMPASS+ · hoja canónica consolidada. */
/* Base: estructura y componentes; media queries al final por anchura y accesibilidad. */

* {
  box-sizing: border-box;
}
html {
  margin: 0;
  height: 100%;
  width: 100%;
}
body {
  margin: 0;
  height: 100%;
  width: 100%;
  font: 13px/1.45 "Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-variant-numeric: tabular-nums;
}
[hidden] {
  display: none !important;
}
input {
  font: inherit;
  color: inherit;
}
select {
  font: inherit;
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.sidebar-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.1px;
}
.sidebar-heading h2 span {
  font-size: 11px;
  background: var(--surface-2);
  color: var(--ink-soft);
  border-radius: 100px;
  padding: 1px 7px;
  margin-left: 4px;
}
.search-wrap {
  margin: 0 10px 9px;
  position: relative;
}
.search-wrap input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 9px 8px 31px;
  font-size: 13px;
  width: 100%;
  height: 34px;
}
.vessel-filters {
  margin: 0 10px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
}
.vessel-filters summary {
  padding: 6px 9px;
  cursor: pointer;
  color: var(--ink-soft);
}
.vessel-filter-body {
  padding: 8px;
  display: grid;
  gap: 7px;
  background: var(--surface-2);
}
.vessel-filter-body label {
  display: grid;
  gap: 3px;
  color: var(--ink-soft);
}
.vessel-filter-body select {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  padding: 5px;
  width: 100%;
}
.sidebar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: 0 10px 6px;
  color: var(--muted);
  font-size: 11px;
}
.sidebar-actions button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 3px 4px;
  font-weight: 600;
  font-size: 11px;
}
.vessel-list {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}
.vessel:hover {
  background: #eef5f8;
}
.vessel.selected {
  background: #e3f2f8;
  /* La única franja izquierda es el borde de tipo o rol del buque. */
  box-shadow: none;
}
.vessel-label {
  flex: 1;
  min-width: 0;
}
.vessel-label strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.vessel-label small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.vessel-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.vessel-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  border: 1px solid;
  border-radius: 3px;
  padding: 1px 5px;
}
.vessel-tag.ais {
  color: #245d78;
  background: #ebf4f8;
  border-color: #c4dce7;
}
.vessel-tag.escala {
  color: #73582e;
  background: #faf3e6;
  border-color: #e6d7b8;
}
.mobile-toggle {
  display: none;
}
.quiet-btn:hover {
  background: #eff5f8;
}
.map-layers {
  position: relative;
  pointer-events: auto;
  background: #fffef9;
  border-radius: var(--radius);
}
.map-layers>summary {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffffff2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  list-style: none;
  cursor: pointer;
  font-weight: 400;
}
.map-layers>summary::-webkit-details-marker {
  display: none;
}
.map-layers>summary::before {
  content: "▤";
  margin-right: 3px;
}
.map-layers-body {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 520;
  width: 195px;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.map-layers-body label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}
.map-layers-body select {
  margin-left: auto;
  max-width: 90px;
}
.berth-legend {
  width: 11px;
  height: 11px;
  background: #f0c789;
  border: 1px solid #bb883b;
  border-radius: 3px;
}
.passage-legend {
  width: 11px;
  height: 11px;
  background: #247d9a20;
  border: 1px dashed var(--accent);
  border-radius: 3px;
}
.map-selection strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.map-selection small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.map-stats {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--ink-soft);
}
.map-stats b {
  display: block;
  font-size: 15px;
  color: var(--ink);
}
.ship-arrow {
  background: transparent;
  border: 0;
}
.leaflet-tooltip {
  border: 1px solid #d6e2e9 !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
  font: inherit !important;
}
.map-muted .leaflet-tile-pane img.leaflet-tile {
  filter: grayscale(.58) saturate(.58) brightness(1.06) contrast(.96);
}
.leaflet-container {
  font: inherit;
}
.leaflet-control-zoom a {
  color: var(--ink) !important;
}
.ship-tip strong {
  display: block;
  font-size: 12px;
}
.ship-tip small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.scale-detail {
  border-top: 1px solid var(--divider);
  margin-top: 9px;
  padding-top: 7px;
  display: grid;
  gap: 3px;
  font-size: 11px;
}
.scale-detail b {
  font-weight: 600;
}
.scale-detail small {
  line-height: 1.4;
}
#meteoInfo {
  display: grid;
  gap: 4px;
  line-height: 1.5;
}
.ais-snapshot-info {
  margin: 0 10px 9px;
  padding: 7px 9px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.app-brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.nav-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  padding: 5px 12px 0;
}
.nav-tab.active {
  color: #08647e;
  border-bottom-color: #137b96;
}
/* Estado de último dato conservado durante un fallo parcial de API. */
.header-pill.is-degraded {
  background: #FFF6E9;
  border-color: #E9C994;
  color: #87571D;
}

.header-pill {
  background: #eef5f6;
  border: 1px solid #deeaee;
  border-radius: 14px;
  padding: 6px 10px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #46697b;
  font-size: 11px;
}
.demo-badge {
  background: #fff4dd;
  border: 1px solid #f1d28d;
  color: #8e5d16;
  padding: 5px 9px;
  border-radius: 5px;
  font-weight: 750;
  letter-spacing: .3px;
  font-size: 10px;
  white-space: nowrap;
}
.header-icon-button:hover {
  background: var(--surface-2);
}
.sidebar-add:hover {
  background: #dfedf2;
}
.map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 500;
  display: flex;
  gap: 7px;
  pointer-events: none;
  right: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.legend-line.normal {
  border-color: #197e87;
}
.legend-line.warning {
  border-color: #c35344;
}
.time-readout {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: right;
  white-space: nowrap;
}
.time-readout span {
  font-size: 11px;
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 3px 6px;
  border-radius: 5px;
  font-weight: 700;
}
.timeline-controls input[type=range] {
  width: 100%;
  accent-color: #1485a1;
}
.planning-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid var(--border);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
  color: #257991;
  font-weight: 750;
}
.scenario-choice legend {
  font-weight: 700;
  font-size: 12px;
  padding: 0 5px;
}
.scenario-choice label:has(input:checked) {
  background: #ddf1f4;
  border-color: #5a9eac;
  color: #12667b;
}
.scenario-choice input {
  accent-color: #0c829e;
  margin: 0;
}
.selection-heading strong {
  display: block;
  font-size: 12px;
}
.role-card.berth-role {
  border-left: 4px solid var(--role-berth);
}
.role-card.inbound-role {
  border-left: 4px solid var(--role-entry);
}
.role-card.outbound-role {
  border-left: 4px solid var(--role-exit);
}
.role-dot {
  display: inline-block;
  height: 10px;
  width: 10px;
  border-radius: 50%;
}
.berth-dot {
  background: var(--role-berth);
}
.inbound-dot {
  background: var(--role-entry);
}
.outbound-dot {
  background: var(--role-exit);
}
.role-card select {
  width: 100%;
  background: #f9fbfc;
  border: 1px solid #ccdbe2;
  border-radius: 5px;
  padding: 8px;
  font-size: 12px;
}
.role-details {
  min-height: 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.primary-action {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 13px;
  font-weight: 700;
  font-size: 12px;
  background: #11758f;
  color: #fff;
  flex: 1;
}
.primary-action:hover {
  background: #0e6078;
}
.secondary-action {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 13px;
  font-weight: 700;
  font-size: 12px;
  background: #fff;
  border-color: #ccdae1;
  color: #476579;
}
.secondary-action:hover {
  background: #f5f8fa;
}
.empty-evaluation {
  font-size: 12px;
  color: #587182;
  padding: 13px;
  margin: 0;
}
.modal {
  border: 1px solid var(--border);
  box-shadow: 0 15px 65px #112d4550;
  border-radius: 11px;
  padding: 0;
  width: min(95vw,590px);
  max-height: 88dvh;
  overflow: auto;
  background: #fff;
  color: var(--ink);
}
.modal::backdrop {
  background: #0b253a91;
}
.modal.wide-modal {
  width: min(95vw,760px);
}
.modal>header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--divider);
}
.modal form>header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--divider);
}
.modal h2 {
  font-size: 17px;
  margin: 0;
}
.modal [data-close] {
  font-size: 19px;
  background: none;
  border: 0;
  padding: 2px 7px;
}
.modal form>p {
  margin: 0;
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.6;
  padding-bottom: 4px;
  color: var(--muted);
}
.modal-fields {
  padding: 10px 20px 20px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}
.modal-fields label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-soft);
}
.modal-fields input {
  width: 100%;
  border: 1px solid #cbdce3;
  border-radius: 5px;
  padding: 8px;
  background: #fff;
}
.modal-fields select {
  width: 100%;
  border: 1px solid #cbdce3;
  border-radius: 5px;
  padding: 8px;
  background: #fff;
}
.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--divider);
}
.modal footer .primary-action {
  flex: 0;
}
.threshold-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 11px;
}
.threshold-table th {
  border-bottom: 1px solid var(--divider);
  padding: 7px 5px;
  text-align: left;
}
.threshold-table td {
  border-bottom: 1px solid var(--divider);
  padding: 7px 5px;
  text-align: left;
}
.threshold-table thead {
  background: #f3f8fa;
}
.threshold-table th:first-child {
  min-width: 100px;
}
.threshold-table input {
  width: 100%;
  border: 1px solid #cbdce3;
  border-radius: 5px;
  background: #fff;
  max-width: 130px;
  padding: 6px;
}
.demo-role {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.demo-role select {
  border: 1px solid #d4e2e8;
  border-radius: 5px;
  padding: 5px;
  background: #fafcfd;
  max-width: 120px;
  font-size: 11px;
}
.app-brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 0;
}
.sidebar-heading small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.25;
  display: none;
}
.main-nav {
  display: flex;
  align-items: center;
  align-self: stretch;
  margin-right: auto;
  gap: 0;
}
.vessel-actions {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 34px;
  flex: none;
}
.vessel-assign:hover {
  background: #eaf4f7;
}
/* Menú flotante de asignación de rol: portal fuera de la lista con scroll. */
.vessel-assign[aria-expanded="true"] {
  color: #0c6d88;
  background: #e5f3f8;
  border-color: #80b6c7;
}
.vessel-role-menu {
  position: fixed;
  z-index: 5000;
  width: 222px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 20px);
  display: grid;
  gap: 6px;
  padding: 7px;
  overflow-y: auto;
  background: #fff;
  color: #1c3542;
  border: 1px solid #cddde5;
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(17,47,63,.20), 0 2px 6px rgba(17,47,63,.08);
  animation: role-menu-appear 130ms cubic-bezier(.2,.7,.2,1) both;
}
.vessel-role-menu[hidden] { display: none !important; }
.vessel-role-menu-header {
  display: grid;
  gap: 2px;
  padding: 6px 8px 7px;
  border-bottom: 1px solid #e5edf1;
  min-width: 0;
}
.vessel-role-menu-header strong { font-size: 12px; font-weight: 750; }
.vessel-role-menu-header small {
  font-size: 11px;
  color: #6b8290;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.vessel-role-menu-choices { display: grid; gap: 3px; }
.vessel-role-menu-option {
  --role-color: #517181;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  min-height: 49px;
  text-align: left;
  padding: 6px 7px;
  color: #1b3543;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.vessel-role-menu-option.role-berth { --role-color: #7c3aed; }
.vessel-role-menu-option.role-entry { --role-color: #008577; }
.vessel-role-menu-option.role-exit { --role-color: #e36b18; }
.vessel-role-menu-option:hover,
.vessel-role-menu-option:focus-visible {
  background: color-mix(in srgb, var(--role-color) 8%, #fff);
  border-color: color-mix(in srgb, var(--role-color) 30%, #e4ecf1);
  outline: none;
}
.vessel-role-menu-option.is-current {
  background: color-mix(in srgb, var(--role-color) 6%, #fff);
  border-color: color-mix(in srgb, var(--role-color) 24%, #e4ecf1);
}
.vessel-role-menu-glyph {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  flex: none;
  background: color-mix(in srgb, var(--role-color) 11%, #fff);
}
.vessel-role-menu-glyph svg { display: block; }
.vessel-role-menu-copy { display: grid; gap: 1px; min-width: 0; }
.vessel-role-menu-copy strong { font-size: 12px; line-height: 1.2; font-weight: 700; }
.vessel-role-menu-copy small { font-size: 10px; color: #67808f; line-height: 1.25; }
.vessel-role-menu-check { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--role-color); }
@keyframes role-menu-appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .vessel-role-menu { animation: none; }
  .vessel-role-menu-option { transition: none; }
}
.vessel-tag.speed {
  color: #2d6a4f;
  background: #edf8f1;
  border-color: #cbe7d4;
}
.mini-action {
  margin-left: auto;
  border: 1px solid #cadbe2;
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: #476579;
}
.mini-action:hover {
  background: #f4f8fa;
}
.role-title {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.segment-count label {
  font-weight: 700;
  font-size: 12px;
}
.segment-count input {
  width: 80px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.segment-count small {
  font-size: 10px;
  color: var(--muted);
}
.evaluation-mode>strong {
  font-size: 12px;
}
.evaluation-mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.mode-choice.active {
  border-color: #23869d;
  background: #e7f4f7;
  color: #08718a;
}
.evaluation-mode small {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.summary-ship.berth {
  border-left-color: var(--role-berth);
}
.summary-ship.entry {
  border-left-color: var(--role-entry);
}
.summary-ship.exit {
  border-left-color: var(--role-exit);
}
.summary-ship strong {
  font-size: 11px;
}
.summary-ship small {
  font-size: 10px;
  color: var(--muted);
}
.legend-line.unknown {
  border-color: #9aa7b1;
}
.map-evaluation-vessels>strong {
  font-size: 11px;
}
.map-selection:has(~ .map-evaluation-vessels:not([hidden])) {
  display: none !important;
}
.meteo-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.meteo-row-dot.wave {
  background: #2d7bb7;
}
.meteo-row-dot.wind {
  background: #1b8a78;
}
.meteo-row-dot.current {
  background: #d6822f;
}
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 13px;
  gap: 18px;
}
.app-brand strong {
  display: block;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace {
  display: grid;
  overflow: hidden;
  height: calc(100dvh - 52px);
  grid-template-columns: 226px minmax(340px,1fr) 354px;
}
.workspace.catalog-collapsed {
  grid-template-columns: var(--drawer-collapsed-width) minmax(340px,1fr) 354px;
}
/* compat: grid-template-columns: 48px minmax(340px,1fr) 354px; */
.workspace.catalog-collapsed .sidebar > :not(.sidebar-heading) {
  display: none !important;
}
.workspace.catalog-collapsed .sidebar-heading {
  justify-content: center;
  align-items: flex-start;
  padding: 10px 4px 8px;
}
.workspace.catalog-collapsed .catalog-heading {
  display: none;
}
.catalog-toggle:hover {
  background: #eef5f8;
  border-color: #b8cfdb;
}
.sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  min-height: 47px;
}
.vessel {
  display: flex;
  gap: 8px;
  width: 100%;
  border: 0;
  border-top: 1px solid #e2eaf0;
  background: var(--surface);
  text-align: left;
  align-items: flex-start;
  padding: 8px 9px;
  min-height: 54px;
}
.sidebar-add {
  border: 1px solid #b9d5dd;
  border-radius: 6px;
  background: #edf7fa;
  color: #176c83;
  font-weight: 650;
  margin: 7px;
  padding: 8px;
}
#scenarioEditor {
  display: grid;
  gap: 9px;
}
.role-card {
  border: 1px solid #d8e4e9;
  background: #fff;
  display: grid;
  padding: 8px 9px;
  gap: 5px;
  border-radius: 5px;
}
.selection-heading small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
}
.segment-count {
  border: 1px solid var(--border);
  background: #f8fbfc;
  display: grid;
  gap: 6px;
  padding: 9px;
  border-radius: 5px;
}
.scenario-choice {
  margin: 0;
  border: 1px solid #d6e5eb;
  background: #f6f9fa;
  display: flex;
  padding: 7px;
  gap: 5px;
  border-radius: 5px;
}
.scenario-choice label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  border: 1px solid #d8e3e9;
  background: white;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  padding: 6px 3px;
  border-radius: 4px;
}
.mode-choice {
  border: 1px solid var(--border);
  background: white;
  font-weight: 650;
  font-size: 12px;
  padding: 7px 5px;
  border-radius: 4px;
}
.selected-ships-summary {
  display: grid;
  gap: 4px;
}
.map-section {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.map-canvas {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
#map {
  background: #e7eef1;
  height: 100%;
  width: 100%;
  min-height: 0;
}
.map-evaluation-vessels {
  position: absolute;
  z-index: 500;
  top: 12px;
  right: 12px;
  min-width: 210px;
  max-width: 270px;
  background: #ffffffed;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 7px;
  padding: 10px;
  gap: 5px;
  pointer-events: none;
  display: none !important;
}
.map-selection {
  position: absolute;
  z-index: 500;
  background: #fffffff5;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 6px;
  padding: 12px;
  min-width: 215px;
  pointer-events: none;
  top: 56px;
  right: 12px;
  max-width: 240px;
}
.assign-hint {
  pointer-events: none;
  background: #ffffffeb;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 5px;
  color: #476579;
  font-size: 11px;
  max-width: 230px;
}
.timeline {
  z-index: 500;
  display: flex;
  flex-direction: column;
  position: relative;
  inset: auto;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: 245px;
  margin: 0;
  padding: 9px 13px 10px;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: #fff;
}
.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  flex-shrink: 0;
  margin: 0;
}
.timeline-top strong {
  display: block;
  font-size: 12px;
}
.timeline-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 4px;
  gap: 8px;
}
.timeline-controls button {
  border: 1px solid #c8dbe4;
  background: #f5f9fb;
  border-radius: 5px;
  white-space: nowrap;
  padding: 4px 7px;
  min-width: 39px;
}
.meteo-tracks {
  display: grid;
  gap: 2px;
}
.meteo-track {
  display: grid;
  grid-template-columns: 145px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  min-height: 25px;
}
.meteo-track-label {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  min-width: 0;
}
.meteo-track-label small {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.meteo-row-dot {
  border-radius: 999px;
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
}
.meteo-track-svg {
  display: block;
  width: 100%;
  height: 24px;
  overflow: visible;
  background: #f7fafb;
  border-radius: 2px;
}
.meteo-guide {
  stroke: #dde7eb;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.meteo-cursor {
  stroke: #0C6D86;
  stroke-width: 2;
  stroke-dasharray: 3 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.meteo-empty-line {
  stroke: #ccd8dd;
  stroke-width: 1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}
.meteo-line {
  fill: none;
  stroke-width: 2.1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.meteo-line.wave {
  stroke: #2D7BB7;
}
.meteo-line.wind {
  stroke: #168477;
}
.meteo-line.current {
  stroke: #C17B2D;
}
.meteo-point {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.meteo-point.wave {
  fill: #2D7BB7;
}
.meteo-point.wind {
  fill: #168477;
}
.meteo-point.current {
  fill: #C17B2D;
}
.evaluation-result {
  border: 1px solid #d6e5ea;
  border-radius: 5px;
  overflow: visible;
  background: #fff;
}
.band-chart-labels span:last-child {
  color: var(--muted);
  font-weight: 400;
}
.band-bar:hover {
  background: #f0f5f7;
  border-color: #99b4c0;
}
.band-bar-fill {
  display: block;
  width: 100%;
  background: #16785F;
  min-height: 2px;
}
.band-bar.attention .band-bar-fill {
  background: #BD463D;
}
.band-bar.partial .band-bar-fill {
  background: #A96914;
}
.band-bar.unconfigured .band-bar-fill {
  background: #8D98A1;
}
.band-detail-header span {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.motion-rows {
  display: grid;
  gap: 8px;
}
.motion-item {
  display: grid;
  gap: 3px;
}
.motion-name {
  font-weight: 600;
}
.motion-meter-fill {
  height: 100%;
  background: #16785F;
  border-radius: 2px;
}
.motion-meter-fill.over {
  background: #BD463D;
}
.legend-line.partial {
  border-color: #A96914;
}
.workspace.is-evaluated .vessel-actions {
  display: none !important;
}
.workspace.is-evaluated #newOperationButton {
  display: none !important;
}
.ship-role-tooltip.leaflet-tooltip,
.ship-role-popup .leaflet-popup-content-wrapper {
  border: 1px solid #CFDDE5;
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(23, 45, 59, .17);
  background: #FFFFFF;
}
.ship-role-tooltip.leaflet-tooltip {
  z-index: 2200;
  padding: 10px;
  overflow: visible;
}
.ship-role-tooltip.ship-role-tooltip-preview {
  pointer-events: none;
}
.ship-role-tooltip.leaflet-tooltip-top::before,
.ship-role-tooltip.leaflet-tooltip-bottom::before {
  border-top-color: #CFDDE5;
  border-bottom-color: #CFDDE5;
}
.ship-role-popup .leaflet-popup-content,
.ship-role-tooltip .leaflet-tooltip-content {
  margin: 0;
  padding: 16px 18px 16px;
  font-family: inherit;
  box-sizing: border-box;
}
.ship-role-popup-content {
  display: grid;
  gap: 11px;
  min-width: 248px;
  max-width: 320px;
  color: var(--ink);
  font-size: 12px;
}
.ship-role-popup-title {
  display: block;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.ship-role-popup-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ship-role-popup-status {
  font-size: 11px;
  color: var(--ink-soft);
  background: #F4F8FA;
  padding: 8px 12px;
  border-radius: 9px;
  border-left: 3px solid #B8CBD7;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ship-role-popup-heading {
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
  color: #3f5c6b;
}
.ship-role-choice:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}
.ship-role-choice:focus-visible {
  background: var(--accent-subtle);
  border-color: var(--accent);
}
.ship-role-tooltip-preview .ship-role-choice,
.ship-role-tooltip-preview .ship-role-popup-remove {
  opacity: .84;
}
.ship-role-tooltip-preview .ship-role-choice:disabled,
.ship-role-tooltip-preview .ship-role-popup-remove:disabled {
  cursor: default;
}
.ship-role-popup-remove {
  border: none;
  background: none;
  color: #9A493F;
  font-size: 11px;
  text-align: left;
  padding: 4px 2px 1px;
  width: max-content;
  margin-top: 2px;
}
.ship-role-popup-remove:hover {
  text-decoration: underline;
}
.ship-role-popup-readonly {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  border-top: 1px solid var(--divider);
  padding-top: 10px;
  overflow-wrap: anywhere;
}
.evaluation-mode {
  border: 1px solid var(--border);
  display: grid;
  padding: 9px;
  gap: 7px;
  background: #fff;
  border-radius: 5px;
}
.evaluation-mode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.evaluation-mode-heading strong {
  font-size: 12px;
  line-height: 1.3;
}
.evaluation-mode-heading small {
  color: #677983;
  font-size: 10px;
  white-space: nowrap;
}
.evaluation-context:empty { display: none; }
.evaluation-context {
  color: #516774;
  font-size: 10px;
  line-height: 1.4;
  padding: 2px 2px 5px;
  border-bottom: 1px solid #E8EDF1;
}
.result-count.within {
  background: #E8F3EF;
  color: #16785F;
}
.result-count.attention {
  background: #FAEDEA;
  color: #A8362B;
}
.result-count.partial {
  background: #FFF3E2;
  color: #935A11;
}
.result-count.unconfigured {
  background: #F0F3F5;
  color: #647783;
}
.band-bar:focus-visible {
  background: #f0f5f7;
  border-color: #99b4c0;
  outline: 2px solid #0C6D86;
  outline-offset: 0;
}
.band-detail-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  align-items: flex-start;
  gap: 8px;
}
.band-detail-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.band-detail-status.attention {
  color: #A8362B;
}
.band-detail-status.within {
  color: #16785F;
}
.band-detail-status.partial {
  color: #935A11;
}
.band-detail-speed {
  display: grid;
  text-align: right;
  gap: 2px;
  flex-shrink: 0;
}
.motion-ratio.over {
  color: #BD463D;
}
.motion-meter {
  position: relative;
  background: #eef2f4;
  border-radius: 2px;
  overflow: hidden;
  height: 7px;
}
.motion-meter-threshold {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 66.6667%;
  z-index: 1;
  background: #233E4A;
  width: 2px;
}
.motion-scale span {
  position: absolute;
  white-space: nowrap;
}
.motion-scale .zero {
  left: 0;
}
.motion-scale .limit {
  left: 66.66667%;
  transform: translateX(-50%);
  color: #233E4A;
  font-weight: 650;
}
.motion-scale .max {
  right: 0;
}
.band-detail-warning {
  font-size: 10px;
  color: #935A11;
  background: #FFF6E8;
  padding: 7px;
  margin: 0;
}
.motion-meter.is-unavailable {
  background: repeating-linear-gradient(90deg, #EFF2F4 0 7px, #DDE5E9 7px 9px);
}
.inspector-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inspector-title-row h2 {
  margin: 3px 0;
  font-size: 16px;
  line-height: 1.3;
}
.inspector-status.is-ready {
  color: #126A54;
  border-color: #C5E3D8;
  background: #EDF8F3;
}
.inspector-status.is-stale {
  color: #905C12;
  border-color: #F0D8A4;
  background: #FCF7EA;
}
.inspector-overview-text strong {
  font-size: 12px;
}
.inspector-overview-text small {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.inspector-notice {
  padding: 8px 10px;
  border-left: 3px solid #7299A9;
  background: #F1F7FA;
  color: #3C5A69;
  font-size: 11px;
  line-height: 1.5;
}
.inspector-notice.is-stale {
  border-left-color: #A96914;
  background: #FCF7EA;
  color: #805617;
}
.inspector-editor {
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 10px;
}
.inspector-results {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.inspector-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px 0;
  border-top: 1px solid var(--divider);
}
.inspector-section-heading strong {
  font-size: 12px;
}
.inspector-section-heading small {
  font-size: 10px;
  color: var(--muted);
}
.workspace.is-editing.has-results .inspector-results {
  opacity: .91;
}
.workspace.results-stale .map-legend::after {
  content: " · Última evaluación";
  font-size: 10px;
  color: #805617;
}
.workspace.results-stale .inspector-results .inspector-section-heading small {
  color: #905C12;
  font-weight: 600;
}
.workspace.is-editing.has-results .inspector-editor {
  padding-bottom: 14px;
}
.inspector-results .mode-choice:disabled {
  cursor: not-allowed;
  opacity: .65;
}
.inspector-overview-actions .inspector-update-action {
  font-size: 11px;
  white-space: nowrap;
  padding: 6px 9px;
  min-height: 30px;
}
.pane-collapse-button:hover {
  background: #f3f8fa;
}
.pane-rail-label {
  display: none;
}
.overview-kicker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.overview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #E7F4F7;
  border: 1px solid #C7E0E7;
  color: #0F6A81;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}
.overview-chip.neutral {
  background: #F2F6F8;
  border-color: #D8E4EA;
  color: #5A7382;
}
.inspector-overview-text strong#inspectorSummaryTitle {
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -.1px;
}
.inspector-overview-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.inspector-overview-actions .primary-action {
  min-width: 146px;
}
#selectedShipsSummary[hidden] {
  display: none !important;
}
.summary-ship {
  display: grid;
  border: 1px solid var(--border);
  border-left: 3px solid #718c9a;
  padding: 7px 9px;
  gap: 2px;
  border-radius: 4px;
  background: #FCFEFE;
}
.workspace.inspector-collapsed {
  grid-template-columns: 250px minmax(260px,1fr) var(--drawer-collapsed-width);
}
.workspace.catalog-collapsed.inspector-collapsed {
  grid-template-columns: var(--drawer-collapsed-width) minmax(340px,1fr) var(--drawer-collapsed-width);
}
/* compat: grid-template-columns: 48px minmax(340px,1fr) 52px; */
.workspace.inspector-collapsed .planning-pane {
  overflow: hidden;
}
.workspace.inspector-collapsed .planning-pane .pane-scroll {
  display: none;
}
.workspace.inspector-collapsed .planning-pane .eyebrow {
  display: none;
}
.workspace.inspector-collapsed .planning-pane .inspector-title-row {
  display: none;
}
.workspace.inspector-collapsed .planning-pane #paneDescription {
  display: none;
}
.workspace.inspector-collapsed .planning-pane .pane-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding: 10px 4px 8px;
  gap: 10px;
}
.workspace.inspector-collapsed .planning-pane .pane-heading-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 8px;
}
.workspace.inspector-collapsed .planning-pane .pane-collapse-button {
  border: 1px solid #cfdee6;
  background: #f8fbfc;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-weight: 700;
  flex: none;
  color: #476579;
  border-radius: var(--drawer-toggle-radius);
  width: var(--drawer-toggle-size);
  min-width: var(--drawer-toggle-size);
  height: var(--drawer-toggle-size);
  line-height: 1;
  align-self: start;
  margin-top: 1px;
}
.workspace.inspector-collapsed .planning-pane .pane-rail-label {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  color: #527181;
  margin-top: 2px;
}
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #0B253A9C;
  backdrop-filter: blur(3px);
}
.loading-card {
  width: min(92vw,420px);
  border: 1px solid #D5E1E7;
  border-radius: 12px;
  box-shadow: 0 24px 78px #09283B3B;
  background: #fff;
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}
.loading-symbol {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.loading-outer-ring {
  stroke: #B6D4DC;
  stroke-dasharray: 76 82;
  transform-origin: 50% 50%;
  animation: compass-spin 2.4s linear infinite;
}
.loading-inner-path {
  stroke: #0C6D86;
  stroke-linecap: round;
  animation: compass-breathe 1.7s ease-in-out infinite;
}
.loading-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.3px;
  color: #162731;
}
.loading-context {
  font-size: 11px;
  color: #627784;
  line-height: 1.4;
}
.loading-fringe-sketch {
  display: flex;
  width: min(100%,306px);
  height: 61px;
  gap: 3px;
  align-items: stretch;
  padding: 9px 12px;
  margin: 6px 0;
  background: #F2F7F9;
  border: 1px solid #DFE9EE;
  border-radius: 6px;
  overflow: hidden;
}
.loading-fringe-sketch span {
  display: block;
  flex: 1;
  min-width: 0;
  border: 1px solid #C5D5DC;
  background: #D9E5EA;
  border-radius: 2px;
  transform: scaleY(.88);
  opacity: .65;
}
.loading-fringe-sketch.is-calculating span {
  animation: compass-stripe .82s ease-in-out infinite;
  animation-delay: calc(var(--stripe-index) * 75ms);
}
.loading-footer {
  color: #72838D;
  font-size: 10px;
  line-height: 1.45;
  margin: 2px 0 0;
}
body.is-evaluating {
  overflow: hidden;
}
body.is-evaluating .workspace {
  pointer-events: none;
}
body.is-evaluating #evaluationLoading {
  pointer-events: auto;
}
.pane-scroll > * {
  flex: 0 0 auto;
}
.workspace.is-evaluated .pane-heading #paneDescription {
  display: none;
}
.workspace.is-evaluated .inspector-overview #inspectorSummaryTitle {
  display: none;
}
.pane-heading {
  border-bottom: 1px solid var(--divider);
  padding: 10px 13px 9px;
}
.pane-heading .eyebrow {
  letter-spacing: .8px;
  font-size: 10px;
  color: #507685;
}
.pane-heading h2 {
  font-weight: 700;
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: -.2px;
}
.pane-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.pane-heading-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.pane-heading-top > div {
  min-width: 0;
}
.pane-heading-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.heading-action {
  min-height: var(--drawer-toggle-size);
  white-space: nowrap;
}
.pane-collapse-button {
  border: 1px solid #cfdee6;
  background: #f8fbfc;
  display: grid;
  place-items: center;
  padding: 0;
  font-weight: 700;
  flex: none;
  color: #476579;
  border-radius: 8px;
  width: var(--drawer-toggle-size);
  min-width: var(--drawer-toggle-size);
  height: var(--drawer-toggle-size);
  font-size: 0;
  line-height: 1;
  align-self: start;
  margin-top: 1px;
}
.catalog-toggle {
  border: 1px solid #cfdee6;
  background: #f8fbfc;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: none;
  color: #476579;
  border-radius: var(--drawer-toggle-radius);
  width: var(--drawer-toggle-size);
  min-width: var(--drawer-toggle-size);
  height: var(--drawer-toggle-size);
  line-height: 1;
}
.inspector-status {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid #D9E2E8;
  color: #596D79;
  background: #F4F7F9;
  border-radius: 4px;
  font-weight: 650;
  padding: 2px 6px;
  font-size: 10px;
}
.pane-scroll {
  scrollbar-width: thin;
  align-content: start;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  overflow-y: auto;
  padding: 9px 12px 24px;
  gap: 9px;
}
.inspector-overview {
  justify-content: space-between;
  flex-wrap: wrap;
  display: grid;
  border: 0;
  border-bottom: 1px solid var(--hairline-ui);
  border-radius: 0;
  background: transparent;
  padding: 2px 1px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.inspector-overview-text {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}
.inspector-overview .overview-chip {
  min-height: 20px;
  font-size: 10px;
  padding: 2px 7px;
}
.inspector-overview-text #inspectorShipsLabel {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted-ui);
}
.workspace.is-editing:not(.has-results) .inspector-overview-text #inspectorShipsLabel {
  display: none;
}
.inspector-overview-actions .secondary-action {
  font-size: 11px;
  padding: 6px 8px;
  min-height: 30px;
  white-space: nowrap;
  border-color: #C9D9E0;
  background: #FFFFFF;
}
.inspector-overview-actions .secondary-action:hover {
  background: #F0F6F8;
}
.inspector-fold {
  background: #fff;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--hairline-ui);
  border-radius: 0;
}
.fold-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  text-align: left;
  min-height: 34px;
  padding: 7px 2px;
  background: #FFFFFF;
}
.fold-toggle:hover {
  background: #F7FAFB;
}
.fold-title {
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.fold-chevron {
  display: inline-block;
  color: #6F8390;
  transform: rotate(-90deg);
  transition: transform .12s ease;
}
.fold-toggle[aria-expanded="true"] .fold-chevron {
  transform: rotate(0deg);
}
.fold-meta {
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
}
#selectedShipsSummary {
  padding: 3px 0 9px;
  display: grid;
  gap: 0;
}
#selectedShipsSummary .summary-ship.entry {
  border-left-color: #258C79;
}
#selectedShipsSummary .summary-ship.exit {
  border-left-color: #3A87C5;
}
#selectedShipsSummary .summary-ship strong {
  font-size: 11px;
}
#selectedShipsSummary .summary-ship small {
  font-size: 11px;
  color: var(--text-muted-ui);
}
#evaluationPanel {
  display: grid;
  gap: 7px;
}
#evaluationPanel .inspector-section-heading {
  display: none;
}
#evaluationPanel .evaluation-mode {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--hairline-ui);
  background: transparent;
  padding: 3px 1px 10px;
  gap: 7px;
}
#evaluationPanel .evaluation-mode-heading strong {
  font-size: 12px;
}
#evaluationPanel .evaluation-mode-heading small {
  font-size: 11px;
}
#evaluationPanel .mode-choice {
  min-height: 33px;
  font-size: 12px;
}
#evaluationPanel .evaluation-context {
  padding: 1px 1px 6px;
  font-size: 11px;
  border-bottom-color: var(--hairline-ui);
}
#evaluationPanel .evaluation-result {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.result-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  background: #fff;
  border-bottom: 0;
  padding: 8px 2px 7px;
}
.result-intro strong {
  color: #162731;
  font-size: 13px;
}
.result-intro small {
  color: #617581;
  white-space: nowrap;
  font-size: 11px;
}
.result-status-counts {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  padding: 1px 2px 5px;
}
.result-count {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: #EFF3F5;
  color: #3D5361;
  font-size: 11px;
}
.band-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-soft);
  padding-top: 6px;
  padding: 6px 2px 1px;
  font-size: 11px;
}
.band-chart-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 6px 1px 8px;
}
.band-chart {
  display: flex;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
  height: 149px;
  gap: 5px;
}
.band-bar {
  flex: 1 0 37px;
  max-width: 70px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  padding: 3px 1px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: var(--ink);
  min-width: 39px;
  flex-basis: 39px;
}
.band-bar-track {
  width: 100%;
  background: #eef2f4;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  overflow: hidden;
  border-radius: 2px;
  height: 94px;
}
.band-speed {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.band-label {
  font-weight: 700;
  font-size: 12px;
}
.band-distance {
  color: var(--muted);
  white-space: nowrap;
  font-size: 10px;
}
.band-bar.selected {
  background: #E5F1F4;
  border-color: #0C6D86;
  box-shadow: inset 0 -3px #0C6D86;
}
.band-detail {
  display: grid;
  gap: 9px;
  border-top: 1px solid #D8E4E9;
  padding: 12px 1px 15px;
  scroll-margin-top: 12px;
}
.band-detail.is-empty {
  padding: 9px;
  background: #F7FAFB;
}
.band-detail-empty {
  margin: 0;
  color: #5C7180;
  line-height: 1.45;
  font-size: 11px;
}
.band-detail-meta strong {
  font-size: 14px;
}
.band-detail-status {
  font-weight: 600;
  color: #627784;
  font-size: 11px;
}
.band-detail-speed strong {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}
.band-detail-speed small {
  color: #617581;
  font-size: 11px;
}
.band-detail-subheading {
  font-weight: 700;
  border-top: 1px solid var(--divider);
  padding-top: 8px;
  font-size: 11px;
}
.motion-row {
  display: grid;
  gap: 4px;
  align-items: baseline;
  grid-template-columns: 69px minmax(0,1fr) 48px;
  font-size: 12px;
}
.motion-values {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 11px;
}
.motion-ratio {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.motion-scale {
  position: relative;
  height: 15px;
  margin-top: -5px;
  color: #5E7280;
  font-size: 10px;
}
.result-disclaimer {
  border-top: 1px solid #d9e3e8;
  color: #8b5b26;
  background: #fff7e8;
  margin: 0;
  font-size: 11px;
  padding: 9px;
  line-height: 1.45;
}
.map-legend {
  position: absolute;
  z-index: 490;
  display: flex;
  align-items: center;
  background: #fffefaeb;
  border: 1px solid var(--border);
  flex-wrap: wrap;
  bottom: 12px;
  left: 12px;
  border-radius: 4px;
  box-shadow: none;
  max-width: calc(100% - 24px);
  gap: 12px;
  padding: 7px 9px;
  font-size: 11px;
}
.legend-line {
  display: inline-block;
  border-top: 5px dashed;
  margin-right: 4px;
  vertical-align: middle;
  width: 14px;
  border-top-width: 4px;
}
.meteo-strip {
  min-width: 0;
  min-height: 0;
  border-top: 1px solid #d9e7ed;
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  padding-top: 6px;
  gap: 3px;
}
.meteo-strip-head strong {
  color: #274555;
  font-size: 11px;
}
.meteo-strip-head span {
  color: var(--muted);
  font-size: 11px;
}
.meteo-empty-state {
  font-size: 11px;
  color: var(--text-muted-ui);
  padding: 3px 0 1px;
}
.meteo-tracks[hidden] {
  display: none !important;
}
.meteo-empty-state[hidden] {
  display: none !important;
}
.timeline-top small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  font-size: 11px;
}
.timeline-bottom {
  display: flex;
  justify-content: space-between;
  color: #587786;
  margin-left: 48px;
  margin-right: 42px;
  flex-shrink: 0;
  margin: 0 40px 0 46px;
  font-size: 11px;
}
.time-readout strong {
  font-size: 12px;
}
.meteo-strip.is-empty .meteo-strip-head {
  display: none;
}
.meteo-strip.is-empty {
  border-top: 1px solid var(--hairline-ui);
  padding-top: 6px;
}
.vessel-assign {
  width: 28px;
  border: 1px solid #bfd2dc;
  background: #f6fafb;
  color: #176c83;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
}
.vessel-assign > span {
  line-height: 1;
  font-size: 18px;
  font-weight: 500;
}
.ship-role-popup-status.assigned {
  color: var(--role-color, var(--ink));
  background: color-mix(in srgb, var(--role-color, #8c70bc) 10%, white);
  border-left: 3px solid var(--role-color, #8c70bc);
}
.vessel-assign svg {
  display: block;
}
.header-icon-button {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 31px;
  padding: 4px 10px;
  color: var(--ink-soft);
  white-space: nowrap;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.quiet-btn {
  pointer-events: auto;
  background: #fffffff2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.map-layers > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#backToScenarioButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.searchicon {
  position: absolute;
  left: 10px;
  top: 7px;
  font-size: 17px;
  color: #7e97a4;
  pointer-events: none;
  height: 18px;
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.map-layers > summary::before {
  content: none !important;
}
.catalog-toggle .ui-icon {
  display: block;
  width: var(--drawer-toggle-icon-size);
  height: var(--drawer-toggle-icon-size);
  transition: transform 140ms ease;
}
.pane-collapse-button .ui-icon {
  display: block;
  width: var(--drawer-toggle-icon-size);
  height: var(--drawer-toggle-icon-size);
  transition: transform 140ms ease;
}
.workspace.catalog-collapsed .catalog-toggle .ui-icon {
  transform: rotate(180deg);
}
.workspace.inspector-collapsed .pane-collapse-button .ui-icon {
  transform: rotate(180deg);
}
:root {
  --canvas: #F4F6F8;
  --drawer-collapsed-width: 44px;
  --drawer-toggle-size: 36px;
  --drawer-toggle-radius: 8px;
  --drawer-toggle-icon-size: 18px;
  --surface: #FFFFFF;
  --surface-2: #F8FAFB;
  --border: #D9E1E7;
  --divider: #E8EDF1;
  --ink: #162731;
  --ink-soft: #4E626F;
  --muted: #627784;
  --accent: #0C6D86;
  --accent-subtle: #E5F1F4;
  --shadow: none;
  --radius: 5px;
  --text-muted-ui: #536A78;
  --hairline-ui: #E8EDF1;
  --role-berth: #7c3aed;
  --role-entry: #008577;
  --role-exit: #e36b18;
}
.vessel-swatch {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 0;
  width: 25px;
  height: 25px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.vessel-swatch svg {
  overflow: visible;
  display: block;
}
.vessel.selected .vessel-swatch {
  box-shadow: none !important;
  background: transparent;
  border: 0;
  filter: none;
}
.vessel-tag.role {
  color: #fff;
  border-color: transparent;
  font-size: 10px;
  font-weight: 650;
  border: 1px solid transparent;
}
.vessel-tag.role-berth {
  background: #F1EDF8;
  color: #70539F;
  border-color: #DCCFEB;
}
.vessel-tag.role-entry {
  background: #EAF6F1;
  color: #176B58;
  border-color: #C9E9DD;
}
.vessel-tag.role-exit {
  background: #FFF2E9;
  color: #A2541D;
  border-color: #F5D7BF;
}
.ship-role-popup-choices {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.ship-role-choice {
  border: 1px solid #D3E0E7;
  border-left-width: 3px;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  gap: 7px;
}
.ship-role-choice-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  order: -1;
  width: 20px;
  height: 20px;
}
.ship-role-choice.role-berth {
  border-left-color: var(--role-berth);
  --choice-color: var(--role-berth);
}
.ship-role-choice.role-entry {
  border-left-color: var(--role-entry);
  --choice-color: var(--role-entry);
}
.ship-role-choice.role-exit {
  border-left-color: var(--role-exit);
  --choice-color: var(--role-exit);
}
.ship-role-choice.is-current {
  border-color: var(--choice-color);
  background: color-mix(in srgb, var(--choice-color) 8%, #FFFFFF);
}
.ship-role-choice.is-current::after {
  content: "✓";
  margin-left: auto;
  font-size: 14px;
  font-weight: 750;
  color: var(--choice-color);
}
#selectedShipsSummary .summary-ship {
  border: 0;
  border-radius: 0;
  border-left: 3px solid #8C70BC;
  border-bottom: 1px solid #EDF1F3;
  background: #FFFFFF;
  display: grid;
  grid-template-columns: 23px minmax(0,1fr);
  align-items: center;
  column-gap: 6px;
  padding: 8px 10px;
}
#selectedShipsSummary .summary-ship::before {
  display: none;
  content: none;
}
#selectedShipsSummary .summary-ship-glyph {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 24px;
}
#selectedShipsSummary .summary-ship-glyph svg {
  display: block;
}
#selectedShipsSummary .summary-ship-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}
#selectedShipsSummary .summary-ship-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-icon {
  display: inline-block;
  vertical-align: middle;
  flex: none;
  stroke-width: 1.9;
}
.settings-modal {
  display: flex;
  flex-direction: column;
  width: min(92vw, 690px);
  max-height: min(88dvh, 820px);
  overflow: hidden;
  border: 1px solid #CEDCE4;
  border-radius: 9px;
  box-shadow: 0 18px 52px #142B3D42;
}
.settings-modal:not([open]) {
  display: none;
}
.settings-modal .settings-dialog-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 18px 22px 15px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid #E2EAF0;
}
.settings-heading {
  min-width: 0;
}
.settings-eyebrow {
  display: block;
  color: #33788B;
  font-size: 10px;
  letter-spacing: .85px;
  font-weight: 750;
}
.settings-modal .settings-heading h2 {
  font-size: 19px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.35px;
  margin: 4px 0 5px;
}
.settings-heading p {
  margin: 0;
  font-size: 12px;
  color: #617684;
  line-height: 1.5;
}
.settings-modal .dialog-close {
  border: 1px solid transparent;
  background: #F3F7F9;
  border-radius: 6px;
  min-width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: #466477;
  flex: none;
}
.settings-modal .dialog-close:hover {
  background: #E6EEF2;
}
.settings-tabs {
  display: flex;
  padding: 0 22px;
  gap: 21px;
  flex: none;
  border-bottom: 1px solid #E4ECF1;
  background: #fff;
}
.settings-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 1px 10px;
  color: #627887;
  font-size: 12px;
  font-weight: 600;
}
.settings-tab:hover {
  color: #0C6D86;
}
.settings-tab.active {
  color: #0C6D86;
  border-bottom-color: #0C6D86;
}
.settings-modal .settings-content {
  padding: 19px 22px 23px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  scrollbar-width: thin;
}
.settings-view[hidden] {
  display: none !important;
}
.settings-view > h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 17px 0 10px;
  letter-spacing: -.1px;
}
.settings-view > h3:first-child {
  margin-top: 0;
}
.settings-lead {
  font-size: 12px;
  color: #5C7180;
  line-height: 1.55;
  margin: 0 0 10px;
}
.settings-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid #CA9449;
  background: #FBF6EB;
  border-radius: 0 5px 5px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #5F513B;
}
.settings-notice strong {
  font-size: 10px;
  letter-spacing: .35px;
  color: #836024;
}
.criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.criterion-explainer {
  display: flex;
  gap: 9px;
  border: 1px solid #E0E9EE;
  border-radius: 6px;
  padding: 12px;
  align-items: flex-start;
}
.criterion-marker {
  display: block;
  flex: none;
  width: 5px;
  height: 31px;
  background: #137B91;
  border-radius: 4px;
}
.criterion-marker.permanence {
  background: #8193A2;
}
.criterion-explainer strong {
  font-size: 12px;
}
.criterion-explainer p {
  font-size: 11px;
  line-height: 1.45;
  color: #617684;
  margin: 3px 0 0;
}
.reading-guide {
  display: grid;
  gap: 10px;
}
.reading-guide > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.read-step {
  border: 1px solid #C8DBE3;
  border-radius: 50%;
  display: grid;
  flex: none;
  place-items: center;
  width: 21px;
  height: 21px;
  color: #0C6D86;
  font-size: 10px;
  font-weight: 700;
}
.reading-guide p {
  margin: 1px 0 0;
  font-size: 11.5px;
  line-height: 1.48;
  color: #587181;
}
.reading-guide p strong {
  color: #172D3B;
}
.inline-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #0C6D86;
  border: 0;
  background: none;
  padding: 10px 0 0;
  font-size: 12px;
  font-weight: 650;
}
.inline-nav-action:hover {
  text-decoration: underline;
}
.subtle-tag {
  font-size: 10px;
  font-weight: 500;
  color: #527383;
  background: #EDF4F7;
  padding: 3px 6px;
  border-radius: 3px;
  margin-left: 5px;
}
.settings-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #DCE6EC;
  border-radius: 6px;
}
.settings-modal .settings-threshold-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 12px;
}
.settings-modal .settings-threshold-table thead {
  background: #F5F8FA;
}
.settings-modal .settings-threshold-table thead th {
  border-bottom: 1px solid #DEE8ED;
  color: #587383;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 650;
}
.settings-modal .settings-threshold-table th {
  padding: 8px 12px;
  border-bottom: 1px solid #EDF1F4;
}
.settings-modal .settings-threshold-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #EDF1F4;
}
.settings-modal .settings-threshold-table tbody tr:last-child > * {
  border-bottom: 0;
}
.settings-modal .settings-threshold-table .threshold-group-row th {
  padding: 7px 12px;
  color: #607686;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  background: #F5F8FA;
  text-align: left;
  border-top: 1px solid #DFE8EE;
}
.settings-modal .settings-threshold-table .number-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.settings-modal .settings-threshold-table .threshold-unit {
  color: #748895;
  text-align: center;
  width: 60px;
}
.settings-modal .settings-threshold-table .threshold-empty {
  color: #9CAAB3;
}
.settings-modal .settings-threshold-table th:first-child {
  min-width: 112px;
}
.settings-footnote {
  margin: 10px 0 0;
  font-size: 11px;
  color: #647A88;
  line-height: 1.5;
}
.settings-modal .settings-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  flex: none;
  margin: 0;
  background: #FBFCFD;
  border-top: 1px solid #E1E9EE;
}
.settings-footer-caption {
  font-size: 10px;
  color: #82949F;
}
.settings-modal .settings-dialog-footer .primary-action {
  flex: none;
  min-width: 92px;
  border-radius: 5px;
}
.admin-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 12px 0;
  margin-top: 11px;
  border-bottom: 1px solid #E5EBEF;
}
.admin-context-grid > div {
  display: grid;
  gap: 3px;
  padding: 0 12px;
  border-left: 3px solid #0C7893;
}
.admin-context-grid > div + div {
  margin-left: 12px;
  border-left-color: #94A4AF;
}
.admin-context-grid strong {
  font-size: 12px;
}
.admin-context-grid span {
  font-size: 11px;
  color: #617887;
}
.settings-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 7px;
}
.settings-table-heading h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.1px;
  margin: 0;
}
.config-status {
  font-size: 10px;
  color: #637B8A;
  background: #F1F5F7;
  border: 1px solid #DCE6EB;
  border-radius: 20px;
  padding: 4px 8px;
  white-space: nowrap;
}
.config-status.dirty {
  color: #8C641F;
  background: #FFF7E8;
  border-color: #ECD9B5;
}
.config-status.invalid {
  color: #A8372D;
  background: #FFF1EF;
  border-color: #F0C6C1;
}
.admin-threshold-table input {
  max-width: 112px;
  height: 31px;
  padding: 5px 8px;
  font-size: 12px;
  text-align: right;
  border: 1px solid #D3E0E7;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.admin-threshold-table input:focus {
  border-color: #0C6D86;
  box-shadow: 0 0 0 2px #0C6D8617;
  outline: none;
}
.admin-threshold-table input:invalid {
  border-color: #B74238;
  background: #FFF7F6;
}
.settings-validation {
  margin: 10px 0 0;
  padding: 9px 11px;
  font-size: 11px;
  background: #FFF0EE;
  color: #A5362D;
  border-left: 3px solid #BC4D43;
}
.settings-modal .tertiary-action {
  border: 0;
  background: transparent;
  padding: 7px 0;
  font-size: 11px;
  font-weight: 650;
  color: #526D7D;
}
.settings-modal .tertiary-action:hover {
  color: #0C6D86;
  text-decoration: underline;
}
.settings-save-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-modal .settings-save-actions .secondary-action {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 34px;
}
.settings-modal .settings-save-actions .primary-action {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 34px;
}
.settings-modal .settings-save-actions .primary-action:disabled {
  cursor: not-allowed;
  opacity: .46;
}
.settings-saved-toast {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 2600;
  background: #F0FAF5;
  border: 1px solid #B8DFCD;
  color: #20674D;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 5px 18px #1C4F3E20;
}
.settings-modal .settings-dialog-footer button.primary-action[data-close] {
  background: #0C6D86;
  border-color: #0C6D86;
  color: #fff;
}
.settings-modal .settings-dialog-footer button.primary-action[data-close]:hover {
  background: #09576D;
}
.evaluation-status-guide {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 4px 0 14px;
}
.evaluation-status-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 10px;
  background: #F8FAFB;
  border: 1px solid #E4EBEF;
  border-radius: 6px;
}
.evaluation-status-item>div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.evaluation-status-item strong {
  font-size: 11px;
  font-weight: 700;
  color: #172D3B;
}
.evaluation-status-item small {
  font-size: 11px;
  line-height: 1.4;
  color: #576F7C;
}
.evaluation-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  flex: none;
  border-radius: 3px;
  background: #87939C;
  margin-top: 3px;
}
.evaluation-status-dot.within {
  background: #16785F;
}
.evaluation-status-dot.partial {
  background: #A96914;
}
.evaluation-status-dot.attention {
  background: #BD463D;
}
.evaluation-status-dot.unconfigured {
  background: #87939C;
}
.admin-status-explainer {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 11px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid #E6EDF1;
}
.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #455F6E;
}
.status-inline .evaluation-status-dot {
  margin-top: 0;
}
.admin-status-note {
  flex-basis: 100%;
  font-size: 10px;
  line-height: 1.4;
  color: #6B7E89;
}

@media (min-width:621px) {
  .admin-modal .settings-dialog-header {
    padding-top: 14px;
    padding-bottom: 12px;
  }
  .admin-modal .settings-content {
    padding-top: 14px;
    padding-bottom: 15px;
  }
  .admin-modal .settings-notice {
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .admin-modal .admin-context-grid {
    margin-top: 6px;
    padding: 8px 0;
  }
  .admin-modal .settings-table-heading {
    margin-top: 12px;
  }
  .admin-modal .settings-threshold-table tbody tr:not(.threshold-group-row) > * {
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .admin-modal .settings-threshold-table .threshold-group-row th {
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .admin-modal .settings-footnote {
    margin-top: 7px;
  }
}

@media (max-width:1260px) {
  .sidebar-heading {
    padding: 11px;
  }
  .header-pill {
    display: none;
  }
  .assign-hint {
    display: none;
  }
  .workspace {
    grid-template-columns: 200px minmax(300px,1fr) 324px;
  }
  .workspace.catalog-collapsed {
    grid-template-columns: 48px minmax(300px,1fr) 324px;
  }
  .workspace.inspector-collapsed {
    grid-template-columns: 210px minmax(250px,1fr) var(--drawer-collapsed-width);
  }
  .workspace.catalog-collapsed.inspector-collapsed {
    grid-template-columns: var(--drawer-collapsed-width) minmax(300px,1fr) var(--drawer-collapsed-width);
  }
}

@media (max-width:1020px) {
  .vessel-list {
    min-height: 120px;
  }
  .demo-role {
    font-size: 0;
  }
  .demo-role select {
    font-size: 10px;
    max-width: 100px;
  }
  .map-legend {
    bottom: 300px;
  }
  .map-evaluation-vessels {
    right: 8px;
    max-width: 220px;
  }
  .workspace {
    height: calc(100dvh - 52px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) 318px;
    grid-template-rows: minmax(0,1fr);
    overflow: hidden;
  }
  .workspace>.sidebar {
    grid-row: 2;
    grid-column: 1/-1;
    max-height: 280px;
    border-top: 1px solid var(--border);
    border-right: 0;
    display: none;
  }
  .workspace>.map-section {
    grid-column: 1;
    grid-row: 1;
  }
  .workspace>.planning-pane {
    grid-column: 2;
    grid-row: 1;
  }
  .workspace.catalog-collapsed {
    grid-template-columns: minmax(0,1fr) 318px;
  }
  .timeline {
    max-height: 245px;
  }
  .workspace.inspector-collapsed {
    grid-template-columns: minmax(0,1fr) var(--drawer-collapsed-width);
    grid-template-rows: minmax(540px,calc(100dvh - 68px)) auto;
  }
  .workspace.catalog-collapsed.inspector-collapsed {
    grid-template-columns: minmax(0,1fr) var(--drawer-collapsed-width);
    grid-template-rows: minmax(540px,calc(100dvh - 68px)) auto;
  }
  .pane-scroll {
    padding: 9px 10px 18px;
  }
  .inspector-overview {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .band-chart {
    gap: 3px;
  }
  .band-bar {
    min-width: 36px;
    flex-basis: 36px;
  }
}

@media (max-width:720px) {
  .header-icon-button span {
    display: none;
  }
  .app-brand small {
    font-size: 10px;
  }
  .workspace>.sidebar .vessel-list {
    max-height: 240px;
  }
  .sidebar .mobile-toggle {
    display: none;
  }
  .map-selection {
    top: 54px;
    right: 8px;
  }
  .timeline-top small {
    max-width: 220px;
  }
  .modal-fields {
    grid-template-columns: 1fr;
  }
  .map-evaluation-vessels {
    max-width: 180px;
  }
  .workspace {
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .workspace.catalog-collapsed {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .workspace>.sidebar {
    flex-basis: auto;
    overflow: visible;
    display: flex;
    order: 3;
    min-height: 0;
    max-height: 320px;
  }
  .workspace.catalog-collapsed>.sidebar {
    display: none;
  }
  .workspace>.planning-pane {
    border-left: 0;
    border-top: 1px solid var(--border);
    min-height: 0;
    order: 2;
  }
  .map-canvas {
    min-height: 310px;
  }
  .meteo-track {
    grid-template-columns: 115px minmax(0,1fr);
    gap: 5px;
  }
  .meteo-track-label {
    font-size: 9px;
  }
  .meteo-track-label small {
    font-size: 8px;
  }
  .meteo-strip-head {
    flex-direction: row;
    align-items: center;
  }
  .meteo-strip-head span {
    max-width: 54%;
    text-align: right;
  }
  .pane-scroll {
    overflow: auto;
  }
  .workspace.inspector-collapsed {
    display: flex;
    flex-direction: column;
  }
  .workspace.catalog-collapsed.inspector-collapsed {
    display: flex;
    flex-direction: column;
  }
  .workspace.inspector-collapsed>.planning-pane {
    order: 2;
    border-top: 1px solid var(--border);
  }
  .workspace.inspector-collapsed .planning-pane .pane-scroll {
    display: none;
  }
  .workspace.inspector-collapsed .planning-pane .eyebrow {
    display: none;
  }
  .workspace.inspector-collapsed .planning-pane #paneDescription {
    display: none;
  }
  .workspace.inspector-collapsed .planning-pane .inspector-title-row {
    display: flex;
  }
  .workspace.inspector-collapsed .planning-pane .pane-heading {
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
  }
  .workspace.inspector-collapsed .planning-pane .pane-heading-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .workspace.inspector-collapsed .planning-pane .pane-rail-label {
    display: none;
  }
  .pane-heading {
    padding: 10px 12px;
  }
  .inspector-overview {
    flex-wrap: wrap;
    grid-template-columns: minmax(0,1fr) auto;
  }
  .inspector-overview-actions {
    margin-left: 0;
  }
  .map-legend {
    left: 12px;
    gap: 12px;
    bottom: 9px;
    font-size: 11px;
    max-width: calc(100% - 24px);
    flex-wrap: wrap;
  }
  .timeline {
    max-width: none;
    max-height: 260px;
    left: 0;
    right: 0;
    bottom: auto;
    padding: 9px 10px 10px;
  }
  .time-readout {
    flex-direction: column;
    gap: 1px;
  }
  .app-header {
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    grid-template-areas: "brand navigation" "actions actions";
    align-items: center;
    height: auto;
    min-height: 0;
    gap: 3px 12px;
    padding: 7px 10px;
  }
  .app-brand {
    grid-area: brand;
  }
  .main-nav {
    grid-area: navigation;
    order: unset;
    width: auto;
    height: 29px;
    justify-content: flex-start;
  }
  .nav-tab {
    padding: 4px 8px;
  }
  .header-actions {
    grid-area: actions;
    justify-content: flex-end;
    min-width: 0;
    flex-wrap: wrap;
  }
  .demo-badge {
    padding: 3px 7px;
    font-size: 9px;
  }
  .header-icon-button {
    min-width: 30px;
    padding: 3px 8px;
    min-height: 28px;
  }
  .demo-role select {
    min-height: 28px;
  }
  .workspace>.map-section {
    flex: none;
    order: 1;
    height: min(75dvh,690px);
    min-height: 500px;
  }
}

@media (max-width:640px) {
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    flex: 0 0 57px;
    overflow: hidden;
    z-index: 600;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar.is-open {
    flex-basis: min(45dvh,345px);
  }
  .sidebar-heading {
    padding: 7px 9px;
    min-height: 57px;
    flex: none;
  }
  .sidebar-heading h2 {
    font-size: 12px;
  }
  .mobile-toggle {
    display: block;
    background: #edf5f8;
    border: 1px solid #ccdde7;
    border-radius: 5px;
    font-size: 11px;
    padding: 5px 9px;
  }
  .map-section {
    flex: 1;
  }
  .map-overlay {
    top: 8px;
    left: 8px;
  }
  .map-selection {
    top: auto;
    right: auto;
    left: 8px;
    bottom: 12px;
    min-width: 195px;
  }
}

@media (max-width:620px) {
  .settings-modal {
    width: calc(100vw - 20px);
    max-height: min(92dvh, 860px);
  }
  .settings-modal .settings-dialog-header {
    padding: 15px 15px 13px;
  }
  .settings-modal .settings-content {
    padding: 14px 15px 18px;
  }
  .settings-tabs {
    padding: 0 15px;
    gap: 16px;
  }
  .settings-tab {
    font-size: 11px;
  }
  .criteria-grid {
    grid-template-columns: 1fr;
  }
  .settings-modal .settings-dialog-footer {
    padding: 10px 15px;
  }
  .settings-modal .settings-threshold-table th {
    padding: 7px 6px;
  }
  .settings-modal .settings-threshold-table td {
    padding: 7px 6px;
  }
  .settings-modal .settings-threshold-table thead th {
    padding: 9px 6px;
  }
  .settings-modal .settings-threshold-table th:first-child {
    min-width: 88px;
  }
  .admin-threshold-table input {
    width: 72px;
    max-width: 72px;
  }
  .admin-dialog-footer {
    flex-wrap: wrap;
  }
  .admin-dialog-footer .settings-save-actions {
    margin-left: auto;
  }
  .admin-context-grid > div {
    padding-left: 8px;
  }
  .admin-context-grid > div + div {
    margin-left: 7px;
  }
}

@media (max-width:520px) {
  .evaluation-status-guide {
    grid-template-columns: 1fr;
  }
  .evaluation-status-item {
    padding: 8px 9px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .loading-outer-ring {
    animation: none !important;
  }
  .loading-inner-path {
    animation: none !important;
  }
  .loading-fringe-sketch.is-calculating span {
    animation: none !important;
  }
  .fold-chevron {
    transition: none;
  }
  .catalog-toggle .ui-icon {
    transition: none;
  }
  .pane-collapse-button .ui-icon {
    transition: none;
  }
  .vessel {
    transition: none !important;
  }
  .vessel-swatch {
    transition: none !important;
  }
  .ship-role-choice {
    transition: none !important;
  }
  .settings-modal * {
    scroll-behavior: auto;
    transition: none !important;
    animation: none !important;
  }
  .settings-saved-toast {
    scroll-behavior: auto;
    transition: none !important;
    animation: none !important;
  }
}

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

@keyframes compass-breathe {
  0%,100% { opacity: .55; }
  50% { opacity: 1; }
}

@keyframes compass-stripe {
  0%,100% { background: #D9E5EA; opacity: .65; transform: scaleY(.88); }
  50% { background: #0C8099; opacity: 1; transform: scaleY(1); }
}

/* V10.1 limpieza visual solicitada */
#inspectorShipsLabel[hidden], #editParametersButton[hidden], #mapLegend[hidden], .admin-status-explainer[hidden] { display: none !important; }

/* V11.9.1 — Tooltips y paleta más amable para buques sin rol. */
.ship-role-tooltip .leaflet-tooltip-content { min-width: 0; }
.ship-role-popup-meta + .ship-role-popup-meta { margin-top: -3px; }
.vessel.unassigned-soft { border-left: 3px solid var(--ship-soft-color, #7a94a6); padding-left: 6px; }
.vessel.unassigned-soft .vessel-swatch { filter: saturate(.92) brightness(1.02); }
.vessel.unassigned-soft .vessel-label strong { color: color-mix(in srgb, var(--ship-soft-color, #7a94a6) 55%, #163247); }

/* V11.9.7 — Localización fija de Atracado en el muelle 34B. */
.modal-fields label[hidden] { display: none !important; }
.fixed-berth-input[readonly] {
  background: #f2f7fa;
  color: #24475a;
  border-color: #bdd0da;
  font-weight: 700;
  cursor: default;
}
.fixed-berth-location {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #f3edff;
  border: 1px solid #dfd0fd;
  border-radius: 6px;
  color: #6e43aa;
  font-size: 10px;
}
.fixed-berth-location[hidden] { display: none !important; }

/* Datos completos de escalas, visibles también sin posición AIS. */
.vessel.has-port-call-details { flex-wrap: wrap; }
.port-call-details { margin: .45rem 0 .2rem; padding: .45rem .6rem;
  border: 1px solid var(--border, #d8e1e8); border-radius: .6rem;
  background: var(--surface, #fff); font-size: .78rem;
  max-height: 350px; overflow: auto; }
.port-call-details > summary { cursor: pointer; font-weight: 650; }
.port-call-record { border-top: 1px solid #e1e6ec; margin-top: .5rem; padding-top: .5rem; }
.port-call-section-title { display: block; margin-top: .5rem; }
.port-call-record dl { display: grid; grid-template-columns: minmax(90px, 40%) minmax(0, 1fr);
  column-gap: .6rem; row-gap: .25rem; margin: .2rem 0 .5rem; }
.port-call-record dt { color: #536170; }
.port-call-record dd { margin: 0; overflow-wrap: anywhere; }
.vessel > .port-call-details { flex-basis: 100%; width: 100%; }

/* V12.14 — Histograma y filtro de eslora en dos rangos. */
.vessel-filter-body .length-filter {
  border-top: 1px solid var(--border);
  margin-top: 3px;
  padding-top: 9px;
  display: grid;
  gap: 6px;
}
.length-filter-head { display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.length-filter-head strong { color:var(--ink); font-size:11px; }
.length-filter-head span { color:var(--ink-soft); font-size:10px; white-space:nowrap; }
.length-histogram { height:39px; display:flex; align-items:end; gap:2px;
  padding:4px 2px 2px; border-bottom:1px solid #c8d5db; overflow:hidden; }
.length-histogram-bar { flex:1; min-width:0; background:#3a93aa;
  border-radius:2px 2px 0 0; opacity:.75; }
.length-histogram-bar.is-empty { background:#e1e9ed; opacity:.7; }
.vessel-filter-body .length-range-label { display:grid;
  grid-template-columns:1fr auto; gap:2px 8px; align-items:center; }
.length-range-label output { color:var(--ink); font-weight:650; }
.length-range-label input[type="range"] { grid-column:1/-1; width:100%;
  min-width:0; height:21px; accent-color:#0e8097; margin:0; cursor:pointer; }
.length-filter > small { color:var(--ink-soft); font-size:10px; line-height:1.3; }

.length-histogram-bar.is-outside { opacity: .2; }

/* V12.15: un único control visual con dos asas; dos inputs accesibles por teclado. */
.length-range-values { display:flex;justify-content:space-between;gap:6px;color:var(--ink-soft);font-size:10px; }
.length-range-values output { color:var(--ink);font-weight:650; }
.length-dual-range { position:relative;height:28px;margin:3px 8px 1px; }
.length-dual-track { position:absolute;left:0;right:0;top:12px;height:6px;border-radius:4px;background:#d6e5ea;pointer-events:none; }
.length-dual-fill { position:absolute;top:0;bottom:0;left:0;right:0;background:#20869d;border-radius:4px; }
.length-dual-range input[type=range] { position:absolute;left:0;top:0;width:100%;height:28px;margin:0;padding:0;
  appearance:none;-webkit-appearance:none;background:transparent;pointer-events:none;cursor:pointer; }
.length-dual-range input[type=range]::-webkit-slider-thumb { appearance:none;-webkit-appearance:none;width:16px;height:16px;
  border-radius:50%;background:#fff;border:2px solid #157890;box-shadow:0 1px 4px #29506833;pointer-events:auto;cursor:grab; }
.length-dual-range input[type=range]::-moz-range-thumb { width:13px;height:13px;border-radius:50%;background:#fff;
  border:2px solid #157890;box-shadow:0 1px 4px #29506833;pointer-events:auto;cursor:grab; }
.length-dual-range input[type=range]:focus-visible { outline:2px solid #146e9a;outline-offset:2px; }
.selection-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.create-ship-button {font-size:11px;white-space:nowrap;}
.role-actions {margin-left:auto;display:inline-flex;gap:5px;align-items:center;}
.role-actions [hidden] { display:none!important; }
.role-card select option:disabled {color:#9ca8b0;background:#edf1f3;}
.modal-fields input[readonly] {background:#edf3f6;color:#647989;cursor:not-allowed;}



.type-filter-field { display:grid; gap:6px; }
.type-filter-ui { position:relative; }
.type-filter-button { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid #B8CBD5; border-radius:12px; background:linear-gradient(180deg,#fff,#f6fafc); min-height:44px; padding:8px 12px; color:#173246; box-shadow:0 2px 8px rgba(15,98,122,.08); }
.type-filter-button-label { display:flex; align-items:center; gap:10px; min-width:0; }
.type-filter-button-label strong { display:block; font-size:13px; }
.type-filter-button-label small { display:block; font-size:11px; color:#6b7c88; }
.type-filter-caret { color:#537286; display:inline-flex; }
.ship-type-dot { width:12px; height:12px; border-radius:50%; display:inline-block; flex:0 0 auto; box-shadow:0 0 0 2px rgba(255,255,255,.92), 0 0 0 3px rgba(15,98,122,.14); }
.ship-type-dot.is-all { width:12px; height:12px; border-radius:999px; background:#d7e5eb; color:#5c7382; display:grid; place-items:center; line-height:1; font-size:10px; }
.type-filter-list { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:30; background:#fff; border:1px solid #d5e4ea; border-radius:14px; box-shadow:0 14px 32px rgba(15,35,52,.16); padding:8px; display:grid; gap:6px; max-height:300px; overflow:auto; }
.type-filter-option { display:flex; align-items:center; width:100%; padding:8px 10px; border:1px solid transparent; border-radius:10px; background:#fff; color:#173246; text-align:left; }
.type-filter-option:hover, .type-filter-option.is-active { background:#eef8fb; border-color:#afd5df; }
.type-filter-option-main { display:flex; align-items:center; gap:10px; }
.type-filter-option-copy strong { display:block; font-size:13px; }
.type-filter-option-copy small { display:block; font-size:11px; color:#72889a; }

/* V12.26 · filtro compacto, sin segunda línea; menú desplegable legible. */
.vessel-filter-body .type-filter-field {width:100%;}
.vessel-filter-body .type-filter-ui {width:min(100%, 158px);max-width:158px;}
.vessel-filter-body .type-filter-button {
  width:100%;min-height:32px;height:32px;padding:5px 9px;
  border-radius:7px;box-shadow:none;gap:6px;
}
.vessel-filter-body .type-filter-button-label {min-width:0;gap:7px;flex:1;}
.vessel-filter-body .type-filter-button-label > span:last-child {min-width:0;}
.vessel-filter-body .type-filter-button-label strong {
  display:block;font-size:11px;font-weight:650;line-height:1.2;
  white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
.vessel-filter-body .type-filter-button-label small {display:none;}
.vessel-filter-body .type-filter-caret {flex:0 0 auto;}
.vessel-filter-body .type-filter-list {width:max(218px,100%);max-width:min(244px,calc(100vw - 32px));}

/* El display:grid del menú no debe anular el atributo hidden. */
.type-filter-list[hidden] {display:none!important;}

/* COMPASS+ V12.34 · popover compacto y selector de tipos de una línea. */
.vessel-role-menu {width:190px;padding:6px;gap:4px;}
.vessel-role-menu-header {padding:5px 7px 6px;gap:1px;}
.vessel-role-menu-header strong {font-size:11px;}
.vessel-role-menu-header small {font-size:10px;}
.vessel-role-menu-option {min-height:32px;padding:5px 7px;gap:7px;}
.vessel-role-menu-glyph {width:20px;height:20px;border-radius:5px;}
.vessel-role-menu-glyph svg {width:14px;height:14px;}
.vessel-role-menu-copy {display:block;}
.vessel-role-menu-copy strong {font-size:11px;white-space:nowrap;}
.vessel-filter-body .type-filter-list {
  width:max(218px,100%);max-height:min(440px,calc(100dvh - 70px));
  overflow-y:auto;gap:2px;padding:5px;
}
.vessel-filter-body .type-filter-option {
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;min-height:29px;padding:6px 10px;
}
.vessel-filter-body .type-filter-option-main {display:flex;align-items:center;gap:8px;min-width:0;}
.vessel-filter-body .type-filter-option-copy {min-width:0;}
.vessel-filter-body .type-filter-option-copy strong {font-size:11px;white-space:nowrap;}
.vessel-filter-body .type-filter-count {
  display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;
  min-width:23px;min-height:19px;padding:2px 5px;
  border-radius:999px;background:#EEF3F7;color:#506778;
  font:600 10px/1.15 ui-monospace,SFMono-Regular,Consolas,monospace;
  font-variant-numeric:tabular-nums;
}

.vessel-filter-body .type-filter-option-copy strong {max-width:178px;overflow:hidden;text-overflow:ellipsis;}
