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

/* ========== map_first.css ========== */
/* COMPASS+ · Map-first layout experiment.
 * Isolated presentation variant: the existing component stylesheet remains canonical.
 * These rules define only the layout variant and its new affordances, not model logic.
 */
.workspace {
  --floating-gap: 14px;
  --left-drawer: 242px;
  --right-drawer: 374px;
  position: relative;
  display: block;
  height: calc(100dvh - 52px);
  min-height: 510px;
  isolation: isolate;
  overflow: hidden;
  background: #dce6e9;
}
.workspace > .map-section {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  z-index: 0;
}
.workspace .map-canvas { position: absolute; inset: 0; height: 100%; min-height: 0; }
.workspace #map { height: 100%; width: 100%; }
.workspace > .sidebar,
.workspace > .planning-pane {
  position: absolute;
  top: var(--floating-gap);
  bottom: auto;
  height: calc(100% - var(--floating-gap) * 2);
  min-height: 0;
  transition: width 220ms cubic-bezier(.2,.75,.2,1),
              height 220ms cubic-bezier(.2,.75,.2,1),
              box-shadow 180ms ease;
  background: rgba(255,255,255,.985);
  border: 1px solid #d7e3e9;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(19,44,61,.14);
  z-index: 1100;
  overflow: hidden;
}
.workspace > .sidebar { left: var(--floating-gap); width: var(--left-drawer); max-height:none; display:flex; flex-direction:column; }
.workspace > .planning-pane { right: var(--floating-gap); width: var(--right-drawer); }
/* Shared collapse pattern: two floating handles instead of full-height rails. */
.workspace.catalog-collapsed { --left-drawer: var(--drawer-collapsed-width); }
.workspace.inspector-collapsed { --right-drawer: var(--drawer-collapsed-width); }
.workspace.catalog-collapsed > .sidebar,
.workspace.inspector-collapsed > .planning-pane {
  bottom: auto;
  width: var(--drawer-collapsed-width);
  height: var(--drawer-collapsed-width);
  min-height: var(--drawer-collapsed-width);
  max-height: var(--drawer-collapsed-width);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(19,44,61,.15);
}
.workspace.catalog-collapsed > .sidebar { display:flex; }
.workspace.catalog-collapsed .sidebar > :not(.sidebar-heading),
.workspace.inspector-collapsed .planning-pane .pane-scroll,
.workspace.inspector-collapsed .planning-pane .scenario-footer { display:none !important; }
.workspace.catalog-collapsed .sidebar-heading,
.workspace.inspector-collapsed .planning-pane .pane-heading {
  display:flex;
  flex-direction:row;
  justify-content:center;
  align-items:center;
  width:100%;
  height:100%;
  min-height:0;
  flex:0 0 auto;
  margin:0;
  padding:3px;
  gap:0;
  border:0;
  background:transparent;
}
.workspace.catalog-collapsed .sidebar-heading > :not(.catalog-toggle),
.workspace.inspector-collapsed .planning-pane .pane-heading-top > div:first-child,
.workspace.inspector-collapsed .pane-heading-actions > :not(.pane-collapse-button) { display:none !important; }
.workspace.inspector-collapsed .planning-pane .pane-rail-label { display:none !important; }
.workspace.inspector-collapsed .planning-pane .pane-heading-top {
  display:flex;
  align-items:center;
  justify-content:center;
  width:auto;
  gap:0;
}
.workspace.catalog-collapsed .catalog-toggle,
.workspace.inspector-collapsed .pane-collapse-button {
  display:grid;
  place-items:center;
  width:var(--drawer-toggle-size);
  min-width:var(--drawer-toggle-size);
  height:var(--drawer-toggle-size);
  margin:0;
  padding:0;
  align-self:center;
  border-radius:var(--drawer-toggle-radius);
}
.workspace.is-evaluated .pane-heading { padding: 10px 12px; }
.workspace .pane-heading { background: rgba(255,255,255,.96); flex: 0 0 auto; padding: 10px 12px; }
.workspace .pane-heading .eyebrow,
.workspace .pane-heading #paneDescription { display:none; }
.workspace .pane-scroll { flex: 1 1 auto; min-height: 0; padding: 8px 12px 12px; gap:6px; }
.workspace.is-editing .inspector-overview { display:none; }
.workspace #scenarioEditor { gap:7px; }
.workspace .scenario-choice { padding:6px; }
.workspace .selection-heading { padding:2px 1px 0; }
.workspace .segment-count { padding:8px 9px; gap:5px; }
.workspace .segment-count small {font-size:11px; line-height:1.35;}
.workspace .sidebar .vessel-list { min-height: 0; }
.workspace .vessel-label, .workspace .vessel { -webkit-user-select: none; user-select: none; }
.workspace .vessel-tags { user-select: none; }

/* Floating map toolset. Controls are grouped and offset from the catalog. */
.workspace .map-overlay {
  position: absolute;
  z-index: 1000;
  top: var(--floating-gap);
  left: calc(var(--left-drawer) + var(--floating-gap) + 10px);
  right: auto;
  width: max-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  padding: 4px;
  transition: left 220ms cubic-bezier(.2,.75,.2,1), box-shadow 160ms ease;
  background: rgba(255,255,255,.97);
  border: 1px solid #d1dfe6;
  border-radius: 9px;
  box-shadow: 0 3px 13px rgba(15,45,65,.13);
  pointer-events: auto;
}
.workspace .map-overlay > .map-layers,
.workspace .map-overlay > .quiet-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 35px;
  flex: 0 0 35px;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  margin: 0;
  padding: 5px;
  background: transparent;
  color: #315468;
  cursor: pointer;
}
.workspace .map-layers > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 25px;
  font-size: 0;
  border: 0;
}
.workspace .map-layers > summary::before { content: none; }
.workspace .map-overlay .toolbar-text { display: none; }
.workspace .map-overlay > .quiet-btn:hover,
.workspace .map-layers > summary:hover { background: #e9f2f5; }
.workspace .map-layers-body {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  background: white;
  border: 1px solid #d5e3e9;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(18,44,60,.16);
  padding: 10px;
  z-index: 1100;
}
.workspace .toolbar-separator { display:block; width:1px; height:24px; background: #d9e4e9; margin:0 3px; flex:0 0 1px; }
.workspace .map-overlay > .quiet-btn:active { transform:scale(.94); }

/* Timeline is a dock over the map, not a panel that shrinks it. */
.workspace .floating-time-dock {
  position: absolute;
  z-index: 1010;
  left: calc(50% + (var(--left-drawer) - var(--right-drawer)) / 2);
  right: auto;
  bottom: 16px;
  top: auto;
  transform: translateX(-50%);
  width: min(790px,calc(100% - var(--left-drawer) - var(--right-drawer) - 54px));
  max-width: none;
  max-height: min(46dvh,350px);
  padding: 10px 13px 8px;
  background: rgba(255,255,255,.98);
  border: 1px solid #d0e0e7;
  border-radius: 11px;
  box-shadow: 0 8px 26px rgba(17,46,64,.19);
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 3px 12px;
  overflow: auto;
  backdrop-filter: blur(6px);
}
.floating-time-dock .timeline-top { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-width:148px; margin:0; }
.floating-time-dock .timeline-top .time-dock-label { display: flex; gap: 7px; align-items: baseline; }
.floating-time-dock .timeline-top strong { font-size: 11px; }
.floating-time-dock .timeline-top small { font-size:10px; color: #607988; }
.floating-time-dock .time-readout { flex-direction:row; gap: 7px; align-items:center; }
.floating-time-dock .time-readout strong { font-size: 11px; letter-spacing: -.1px; }
.floating-time-dock .time-readout span { font-size: 10px; padding: 1px 5px; }
.floating-time-dock .timeline-controls { margin:0; gap:9px; min-width:0; }
.floating-time-dock .timeline-controls button { border-radius:6px; min-width:40px; min-height:34px; font-size:11px; }

.floating-time-dock .timeline-range input { margin: 2px 0 0; width:100%; }
.floating-time-dock .timeline-bottom { display:flex; justify-content:space-between; margin:0; gap:4px; line-height:1.1; font-size:9px; }
.floating-time-dock .meteo-strip { grid-column:1/-1; padding:3px 1px 0; margin:0; border-top: 1px solid #e5edf0; gap:2px; }
.floating-time-dock .meteo-strip > summary { font-size:10px; color:#637b88; cursor:pointer; list-style:none; }
.floating-time-dock .meteo-strip > summary::after { content:'  ▾'; font-size:10px; }
.floating-time-dock .meteo-strip[open] > summary::after { content:'  ▴'; }
.floating-time-dock .meteo-strip.is-empty > summary { cursor:default; }
.floating-time-dock .meteo-strip.is-empty .meteo-strip-head,
.floating-time-dock .meteo-strip.is-empty .meteo-empty-state { display:none; }
.floating-time-dock .meteo-strip-head { padding:4px 0 0; }
.floating-time-dock .meteo-track { grid-template-columns:112px minmax(0,1fr); }
.floating-time-dock .meteo-track-label { font-size:10px; }

/* Right inspector: stationary summary, scrollable details, fixed editor CTA. */
.workspace .inspector-overview-text #inspectorShipsLabel { line-height:1.4; overflow-wrap:anywhere; }
.workspace.is-evaluated .inspector-fold { display:none; }
.workspace .inspector-results .result-disclaimer { display:none; }
.workspace .inspector-results .result-intro { padding:1px 1px 4px; gap:6px; }
.workspace .inspector-results .result-intro strong {font-size:12px; font-weight:700;}
.workspace .inspector-results .result-intro small {font-size:10px; white-space:nowrap;}
.workspace .inspector-results .evaluation-mode-options { margin-top:3px; }
.workspace .planning-pane { display:flex; flex-direction:column; }
.workspace .planning-pane .inspector-overview { padding:4px 1px 7px; grid-template-columns:minmax(0,1fr); gap:5px; }
.workspace .inspector-overview-actions { display:flex; flex-wrap:wrap; gap:5px; justify-content:flex-end; }
.workspace .inspector-overview-actions .secondary-action { font-size:11px; padding:5px 7px; }
.workspace .inspector-results {
  position: sticky;
  top: -10px;
  z-index: 3;
  background: rgba(255,255,255,.99);
  box-shadow: 0 5px 7px -8px #163649;
  border-bottom: 1px solid #d4e1e7;
  padding: 4px 0 8px;
}
.workspace .evaluation-detail-mount { min-height:0; }
.workspace .inspector-results .evaluation-mode { margin-top:3px; }
.workspace .inspector-results .evaluation-context { padding: 3px 0 5px; font-size: 11px; }
.workspace .inspector-results .band-chart { height:110px; gap:4px; }
.workspace .inspector-results .band-bar-track { height:60px; }
.workspace .inspector-results .band-chart-scroll { padding:1px 0 3px; }
.workspace .inspector-results .result-status-counts { padding: 0 1px 2px; }
.workspace .inspector-results .map-legend {
  position:static;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 10px;
  border:0;
  border-top:1px solid #e7eef1;
  box-shadow:none;
  padding:5px 1px 0;
  margin-top:6px;
  background:transparent;
  border-radius:0;
  font-size:10px;
  max-width:none;
}
.workspace .inspector-results .map-legend .legend-line { width:10px; border-top-width:3px; }
.workspace .band-bar.is-hovered { background:#ecf6f8; outline:1px solid #0C6D86; }
.workspace .band-detail.is-empty { display:none; }
.workspace .evaluation-detail-mount .band-detail {gap:7px; padding:10px 1px 10px;}
.workspace .evaluation-detail-mount .band-detail-subheading {padding-top:7px;}
.workspace .scenario-footer {
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:0 0 auto;
  padding:11px 13px 12px;
  border-top:1px solid #d9e4e9;
  background: rgba(255,255,255,.99);
  box-shadow:0 -4px 13px rgba(15,47,62,.05);
}
.workspace .scenario-footer-actions { display:flex; gap:7px; }
.workspace .scenario-footer-actions .primary-action { flex:1; min-height:39px; font-weight:700; }
.workspace .scenario-footer-actions .secondary-action { flex:0 0 auto; max-width:46%; font-size:11px; }
.workspace .scenario-footer-hint { color:#607987; font-size:11px; min-height:15px; }
.workspace .scenario-footer-actions button:disabled { opacity:.55; cursor:not-allowed; }
.workspace .role-card { padding:7px 9px; gap:4px; transition:border-color 180ms ease,box-shadow 180ms ease,background 180ms ease; }
.workspace .band-bar { transition: background-color 160ms ease, outline-color 160ms ease, opacity 160ms ease; }
/* El detalle se anima sólo tras seleccionarlo mediante CompassMotion. */
.workspace .role-label { display:inline-flex; align-items:center; gap:8px; padding:3px 2px; color:inherit; font:inherit; text-align:left; cursor:default; user-select:none; }
.workspace .role-title > .mini-action { margin-left:auto; }

.workspace .role-card .role-details[hidden] {display:none;}
.band-map-tooltip { background:#fff; border:1px solid #c9dce5; border-radius:5px; color:#254153; font-size:11px; padding:6px 9px; box-shadow:0 4px 14px #16394a33; }
.band-map-tooltip::before { border-top-color:#c9dce5 !important; }

@media (max-width:1260px) {
  .workspace { --left-drawer:214px; --right-drawer:338px; --floating-gap:11px; }
  .workspace.catalog-collapsed { --left-drawer:var(--drawer-collapsed-width); }
  .workspace.inspector-collapsed { --right-drawer:var(--drawer-collapsed-width); }
  .workspace .floating-time-dock { width:min(720px,calc(100% - var(--left-drawer) - var(--right-drawer) - 36px)); }
  .workspace .map-overlay { left:calc(var(--left-drawer) + var(--floating-gap) + 10px); }
}
@media (max-width:920px) and (min-width:721px) {
  .workspace { --left-drawer: var(--drawer-collapsed-width); --right-drawer:320px; }
  .workspace:not(.catalog-collapsed) { --left-drawer:210px; }
  .workspace .floating-time-dock { width:min(500px,calc(100% - var(--left-drawer) - var(--right-drawer) - 26px)); padding:8px 9px; grid-template-columns:1fr; }
  .floating-time-dock .timeline-top { flex-direction:row; justify-content:space-between; align-items:center; }
  .floating-time-dock .meteo-strip { grid-column:1; }
}
@media (max-width:720px) {
  .workspace,
  .workspace.catalog-collapsed,
  .workspace.inspector-collapsed,
  .workspace.catalog-collapsed.inspector-collapsed {
    display:flex;
    flex-direction:column;
    height:auto;
    min-height:0;
    overflow:visible;
    background:#f5f8fa;
  }
  .workspace > .map-section {
    position:relative;
    order:1;
    flex:none;
    height:min(68dvh,650px);
    min-height:390px;
    overflow:hidden;
    width:100%;
  }
  .workspace .map-canvas {position:absolute;inset:0;height:100%;}
  .workspace > .sidebar, .workspace > .planning-pane { transition: none; }
  .workspace > .planning-pane,
  .workspace.inspector-collapsed > .planning-pane {
    position:relative;
    order:2;
    top:auto;bottom:auto;right:auto;left:auto;
    width:100%;height:auto;max-height:none;
    border:0;border-radius:0;box-shadow:none;
    min-height:240px;
  }
  .workspace > .sidebar,
  .workspace.catalog-collapsed > .sidebar {
    position:relative;
    order:3;
    top:auto;bottom:auto;right:auto;left:auto;
    width:100%;height:auto;max-height:320px;
    border:0;border-radius:0;box-shadow:none;
  }
  /* On small screens, collapsed panels are accessible horizontal rows. */
  .workspace.catalog-collapsed > .sidebar,
  .workspace.inspector-collapsed > .planning-pane {
    display:flex;
    position:relative;
    top:auto;bottom:auto;left:auto;right:auto;
    width:100%;
    height:52px;
    min-height:52px;
    max-height:52px;
    border:0;
    border-top:1px solid #d7e3e9;
    border-radius:0;
    box-shadow:none;
  }
  .workspace.catalog-collapsed .sidebar-heading,
  .workspace.inspector-collapsed .planning-pane .pane-heading {
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    width:100%;
    height:52px;
    min-height:52px;
    padding:8px 12px;
  }
  .workspace.catalog-collapsed .sidebar-heading > .catalog-heading {display:block!important;}
  .workspace.catalog-collapsed .sidebar-heading > .mobile-toggle {display:none!important;}
  .workspace.inspector-collapsed .planning-pane .pane-heading-top {
    width:100%;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .workspace.inspector-collapsed .planning-pane .pane-heading-top > div:first-child {display:block!important;}
  .workspace.inspector-collapsed .planning-pane .inspector-title-row {display:flex;}
  .workspace.inspector-collapsed .planning-pane .pane-collapse-button {margin:0;}
  /* In stacked mobile panels, chevrons describe vertical expand/collapse. */
  .workspace .catalog-toggle .ui-icon {transform:rotate(90deg);}
  .workspace .pane-collapse-button .ui-icon {transform:rotate(-90deg);}
  .workspace.catalog-collapsed .catalog-toggle .ui-icon {transform:rotate(-90deg);}
  .workspace.inspector-collapsed .pane-collapse-button .ui-icon {transform:rotate(90deg);}
  .workspace .map-overlay { left:12px; top:10px; transition:none; }
  .workspace .floating-time-dock {
    bottom:10px;left:50%;transform:translateX(-50%);
    width:calc(100% - 22px);max-width:660px;
    padding:9px 10px;
    grid-template-columns:1fr;
    gap:6px;
  }
  .floating-time-dock .timeline-top { flex-direction:row;align-items:center;justify-content:space-between; }
  .floating-time-dock .timeline-controls { min-width:0; }
  .floating-time-dock .meteo-strip {grid-column:1;}
  .workspace .planning-pane .pane-scroll { overflow:visible; }
  .workspace .inspector-results { position:relative; top:auto; }
  .workspace .planning-pane .scenario-footer { position:sticky;bottom:0;z-index:15; }
  .workspace .map-legend { bottom:auto; }
}
@media (max-width:420px) {
  .workspace .floating-time-dock { padding:7px 9px; }
  .floating-time-dock .timeline-controls { gap:5px; }
  .floating-time-dock .timeline-controls button { min-width:36px; }
  .floating-time-dock .time-readout strong { font-size:10px; }
  .workspace .inspector-results .band-chart { height:118px; }
  .workspace .inspector-results .band-bar-track {height:65px;}
}
@media (prefers-reduced-motion:reduce) {
  .workspace .role-card { transition:none; }
}

/* Motion is a refinement, never a prerequisite for navigation. */
@media (prefers-reduced-motion: reduce) {
  .workspace > .sidebar,
  .workspace > .planning-pane,
  .workspace .map-overlay,
  .workspace .role-card,
  .workspace .band-bar,
  .workspace .map-overlay > .quiet-btn { transition: none !important; }
  .workspace .evaluation-detail-mount:not([hidden]) .band-detail { animation:none !important; }
}

.workspace .role-title > .role-actions {margin-left:auto;display:inline-flex;gap:5px;}
.workspace .selection-heading > .create-ship-button {display:inline-flex;align-items:center;justify-content:center;}


/* ========== motion.css ========== */
/* COMPASS+ · escala de movimiento unificada. Cargar después de map_first.css.
 * Las animaciones no representan progreso, medidas ni cambios AIS.
 */
:root {
  --motion-quick: 120ms;
  --motion-control: 160ms;
  --motion-standard: 190ms;
  --motion-drawer: 240ms;
  --motion-ease: cubic-bezier(.2,.72,.2,1);
}

/* Paneles: el mapa conserva el encuadre mientras cambian los anchos. */
@media (min-width: 721px) and (prefers-reduced-motion: no-preference) {
  .workspace > .sidebar,
  .workspace > .planning-pane {
    transition: width var(--motion-drawer) var(--motion-ease),
                height var(--motion-drawer) var(--motion-ease),
                box-shadow var(--motion-standard) ease,
                border-radius var(--motion-standard) ease;
  }
  .workspace .map-overlay {
    transition: left var(--motion-drawer) var(--motion-ease),
                box-shadow var(--motion-standard) ease;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Controles: respuesta inmediata, sin rebotes. */
  .workspace :is(.catalog-toggle, .pane-collapse-button, .vessel-assign,
    .mini-action, .primary-action, .secondary-action, .mode-choice,
    .timeline-controls button, .sidebar-add,
    .map-overlay > .quiet-btn, .map-layers > summary, .ship-role-choice,
    .fold-toggle, .vessel-role-menu-option),
  .header-actions button,
  .vessel-role-menu-option,
  .settings-modal button {
    transition: background-color var(--motion-control) ease,
                border-color var(--motion-control) ease,
                box-shadow var(--motion-control) ease,
                color var(--motion-control) ease;
  }
  .workspace :is(.vessel-assign, .map-overlay > .quiet-btn,
    .catalog-toggle, .pane-collapse-button):active:not(:disabled) {
    transform: scale(.95);
    transition-duration: var(--motion-quick);
  }
  .workspace .vessel,
  .workspace .role-card,
  .workspace .scenario-choice label,
  .workspace .band-bar,
  .workspace .motion-meter-fill,
  .workspace .band-bar-fill {
    transition: background-color var(--motion-control) ease,
                border-color var(--motion-control) ease,
                box-shadow var(--motion-control) ease,
                outline-color var(--motion-control) ease;
  }
  .workspace .vessel:focus-visible,
  .vessel-role-menu-option:focus-visible,
  .workspace .band-bar:focus-visible {
    outline: 2px solid #127b95;
    outline-offset: -2px;
  }
  .workspace .fold-chevron,
  .workspace :is(.catalog-toggle,.pane-collapse-button) .ui-icon {
    transition: transform var(--motion-control) var(--motion-ease);
  }
  .workspace .meteo-strip > summary {
    transition: background-color var(--motion-quick) ease,
                color var(--motion-quick) ease;
  }

  /* Diálogos: entrada discreta; el cierre sigue siendo instantáneo y accesible. */
  .ship-role-tooltip.leaflet-tooltip {
    animation: compass-tooltip-enter 140ms ease-out both;
  }
  @keyframes compass-tooltip-enter {
    from {opacity: .3;}
    to {opacity: 1;}
  }
  dialog.modal[open] {
    animation: compass-dialog-enter 180ms var(--motion-ease) both;
  }
  dialog.modal[open]::backdrop {
    animation: compass-backdrop-enter 150ms ease both;
  }
  @keyframes compass-dialog-enter {
    from {opacity: .45; transform: translateY(7px) scale(.992);}
    to {opacity: 1; transform: none;}
  }
  @keyframes compass-backdrop-enter {
    from {opacity: 0;}
    to {opacity: 1;}
  }
}

/* Un único modo accesible: suprime también animaciones preexistentes. */
@media (prefers-reduced-motion: reduce) {
  .workspace > .sidebar,
  .workspace > .planning-pane,
  .workspace .map-overlay,
  .workspace .map-overlay *,
  .workspace .role-card,
  .workspace .band-bar,
  .workspace .band-bar-fill,
  .workspace .motion-meter-fill,
  .workspace :is(.catalog-toggle, .pane-collapse-button) .ui-icon,
  .vessel-role-menu,
  .ship-role-tooltip.leaflet-tooltip,
  dialog.modal[open],
  dialog.modal[open]::backdrop {
    animation: none !important;
    transition: none !important;
  }
}


/* ========== v117.css ========== */
/* V11.7 — diferencia estable entre roles y buques sin rol. */
.ship-arrow.is-assigned { background:transparent; border:0; }
.ship-marker-assigned {
  display: grid;
  place-items:center;
  position:relative;
  width:56px;
  height:56px;
  overflow:visible;
  filter: drop-shadow(0 2px 2px #102c3959);
}
.ship-marker-assigned > svg { display:block; overflow:visible; }
.ship-marker-badge {
  position:absolute;
  display:grid;
  place-items:center;
  color:#fff;
  font:900 10px/1 system-ui,sans-serif;
  letter-spacing:.01em;
  text-shadow:0 1px 2px rgba(10, 27, 37, .45);
  pointer-events:none;
  z-index:2;
}


.ship-marker-assigned.role-berth { --marker-role:#7c3aed; }
.ship-marker-assigned.role-entry { --marker-role:#008577; }
.ship-marker-assigned.role-exit { --marker-role:#e36b18; }

/* El borde de color, no el hover, representa una asignación persistente. */
.workspace .vessel.has-role {
  border-left:4px solid var(--ship-role-color);
  background:color-mix(in srgb,var(--ship-role-color) 7%, white);
  padding-left:5px;
}
.workspace .vessel.has-role.role-berth { --ship-role-color:#7c3aed; }
.workspace .vessel.has-role.role-entry { --ship-role-color:#008577; }
.workspace .vessel.has-role.role-exit { --ship-role-color:#e36b18; }
.workspace .vessel.has-role.selected {
  background:color-mix(in srgb,var(--ship-role-color) 13%, white);
}
.workspace .vessel-terminal {
  display:block;
  flex-basis:100%;
  font-size:10px;
  line-height:1.3;
  color:#486374;
  white-space:normal;
  overflow-wrap:anywhere;
}
.workspace .role-card.has-assignment { border-left-width:4px; }
.workspace .role-card .role-details {
  font-size:11px; line-height:1.35;
  display:grid; gap:2px;
}
.workspace .role-card .role-details > span { display:block; overflow-wrap:anywhere; }
.workspace .role-card .role-details > span:not(:first-child) { color:#476775; }
.workspace .role-card [data-edit-role] { min-width:52px; }
.workspace .role-card [data-edit-role]:not(:disabled):hover { background:#edf6f9; }
.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-tag.role-exit { background:#fff0e7; border-color:#f6d5be; color:#a64a12; }
.vessel-tag.role-entry { background:#e1f5f1; border-color:#b7e6da; color:#006d64; }
.vessel-tag.role-berth { background:#f0e9ff; border-color:#ddcbfc; color:#6a33b8; }

/* El menú del mapa muestra las opciones directamente, sin CTA duplicada. */
.ship-role-popup-choices { margin-top:2px; }
.ship-role-popup-heading { margin-top:3px; }

.vessel-tag.hypothetical { background:#f2f5f8; border-color:#cfd9e1; color:#465e6e; }


/* ========== marker_polish.css ========== */
/* COMPASS+ V11.9.6 — Detalle contextual, estados de selección y respuesta táctil. */

/* No modificar el transform de Leaflet: únicamente se animan hijos del icono. */
.ship-arrow .ship-glyph-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.ship-arrow .ship-glyph-shell > svg,
.ship-arrow .ship-marker-assigned > svg {
  display: block;
  transition: filter 170ms ease, scale 170ms cubic-bezier(.22, 1, .36, 1);
}
@media (hover: hover) and (pointer: fine) {
  .ship-arrow:not(.is-assigned):hover .ship-glyph-shell > svg {
    scale: 1.08;
    filter: drop-shadow(0 2px 5px rgba(25, 59, 81, .25));
  }
  .ship-arrow.is-assigned:hover .ship-marker-assigned > svg {
    scale: 1.035;
    filter: drop-shadow(0 2px 4px rgba(25, 59, 81, .22));
  }
}
.ship-arrow.is-selected:not(.is-assigned) .ship-glyph-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(29, 110, 148, .40);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}
.ship-arrow.is-assigned.is-selected .ship-marker-assigned {
  filter: drop-shadow(0 3px 4px rgba(9, 47, 63, .42));
}
.ship-marker-assigned.has-heading .ship-marker-badge {
  inset:0;
  padding-top:1px;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(10, 27, 37, .72);
}
.ship-marker-assigned.is-dot .ship-marker-badge {
  width:18px;
  height:18px;
  right:2px;
  bottom:1px;
  border-radius:999px;
  background:var(--marker-role, #3A7BA6);
  border:2px solid #FFFFFF;
  box-shadow:0 2px 6px rgba(16,44,57,.22);
  font-size:9px;
  text-shadow:none;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  font-size: 10px;
  border: 2px solid white;
}

/* Resuelve el white-space:nowrap que Leaflet aplica por defecto, y que
   provocaba que el estado y las descripciones atravesaran el borde blanco. */
.ship-role-tooltip.leaflet-tooltip {
  box-sizing: border-box;
  width: min(326px, calc(100vw - 32px));
  max-width: min(326px, calc(100vw - 32px));
  padding: 13px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  border-radius: 15px !important;
  border: 1px solid #d2e0e6 !important;
  background: #ffffff !important;
  box-shadow: 0 14px 36px rgba(22, 54, 72, .16), 0 2px 6px rgba(22, 54, 72, .055) !important;
}
.ship-role-tooltip.leaflet-tooltip .leaflet-tooltip-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ship-role-tooltip .ship-role-popup-content {
  box-sizing: border-box;
  display: grid;
  min-width: 0;
  max-width: none;
  width: 100%;
  gap: 9px;
  white-space: normal;
}
.ship-role-popup-header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
}
.ship-role-popup-heading-group {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.ship-role-tooltip .ship-role-popup-title {
  font-size: 13px;
  font-weight: 760;
  line-height: 1.3;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.ship-role-popup-type {
  display: block;
  color: #547081;
  font-size: 10px;
  line-height: 1.3;
}
.ship-role-popup-dismiss {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  padding: 0;
  margin: -3px -3px 0 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #66808d;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 130ms ease, color 130ms ease;
}
.ship-role-popup-dismiss:hover,
.ship-role-popup-dismiss:focus-visible {
  color: #264f64;
  border-color: #d7e5ec;
  background: #f0f6f9;
}
.ship-role-tooltip .ship-role-popup-meta {
  font-size: 10.5px;
  color: #627c89;
  line-height: 1.45;
  overflow-wrap: anywhere;
  min-width: 0;
}
.ship-role-tooltip .ship-role-popup-status {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 620;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ship-role-tooltip .ship-role-popup-readonly {
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  padding-top: 10px;
  border-top: 1px solid #E1EBEF;
  color: #637B89;
}
.ship-role-tooltip .ship-role-popup-heading {
  font-size: 10px;
  margin-top: 2px;
  color: #536e7e;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.ship-role-tooltip .ship-role-popup-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.ship-role-tooltip .ship-role-choice {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
  border-left-width: 3px;
  padding: 7px 7px;
  min-height: 38px;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.ship-role-tooltip .ship-role-choice:focus-visible {
  outline: 2px solid #13809d;
  outline-offset: 2px;
}
.ship-role-tooltip .ship-role-choice.is-current {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--choice-color) 30%, transparent);
}
.ship-role-tooltip .ship-role-popup-remove {
  border: none;
  background: transparent;
  text-decoration: none;
  font-size: 11px;
  color: #a44d42;
  padding: 4px 2px;
  margin-top: 2px;
}
.ship-role-tooltip-preview .ship-role-choice:disabled {
  opacity: 1;
}
.ship-role-tooltip-preview .ship-role-popup-dismiss {
  display: none;
}

/* Feedback contextual sin re-renderizar la lista completa. */
.workspace .vessel {
  transition: background-color 150ms ease, border-color 150ms ease;
}
.workspace .vessel.selected:not(.has-role) {
  background: color-mix(in srgb, var(--ship-soft-color, #7a94a6) 15%, white);
}
.workspace .vessel:focus-visible {
  outline: 2px solid #1685a3;
  outline-offset: -2px;
}

@media (max-width: 600px) {
  .ship-role-tooltip.leaflet-tooltip {
    width: min(306px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    padding: 11px !important;
    max-height: min(74dvh, 470px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .ship-role-tooltip .ship-role-popup-choices { gap: 5px; }
  .ship-role-tooltip .ship-role-choice { min-height: 42px; padding: 8px 5px; }
  .ship-role-popup-dismiss { flex-basis: 32px; width: 32px; height: 32px; }
}
@media (hover: none) and (pointer: coarse) {
  .ship-role-tooltip.ship-role-tooltip-preview { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .ship-arrow .ship-glyph-shell > svg,
  .ship-arrow .ship-marker-assigned > svg,
  .ship-role-tooltip .ship-role-choice,
  .ship-role-popup-dismiss,
  .workspace .vessel {
    transition: none !important;
  }
}

/* Única confirmación animada al seleccionar, sin animar cada refresco AIS. */
@media (prefers-reduced-motion: no-preference) {
  .ship-arrow.is-selected .ship-glyph-shell > svg,
  .ship-arrow.is-selected.is-assigned .ship-marker-assigned > svg {
    animation: compass-marker-select 170ms cubic-bezier(.22, 1, .36, 1) both;
  }
  @keyframes compass-marker-select {
    from { scale: .90; opacity: .78; }
    to { scale: 1; opacity: 1; }
  }
}


/* ========== timeline_v1192.css ========== */
/* V11.9.2 · Una escala temporal común para viento, oleaje y corriente. */
.floating-time-dock .timeline-range {
  flex:1; display:grid; gap:1px; min-width:0;
  position:relative; min-width:0;
}
.floating-time-dock .timeline-reference-layer {
  position:absolute; left:10px; right:10px; top:16px;
  height:16px; pointer-events:none; z-index:2;
}
.floating-time-dock .timeline-reference-layer[hidden] {display:none;}
.floating-time-dock .timeline-controls .timeline-reference-marker {
  position:absolute; top:2px; transform:translateX(-50%);
  background:#eff8f8; border:1px solid #8bc7c5;
  color:#006f66; border-radius:4px; font-size:8px;
  padding:1px 3px; line-height:1.1; letter-spacing:.2px;
  font-weight:750; cursor:pointer; pointer-events:auto;
  min-height:0; min-width:0; height:14px;
  white-space:nowrap; transition:background 130ms ease, border-color 130ms ease;
}
.floating-time-dock .timeline-controls .timeline-reference-marker:hover,
.floating-time-dock .timeline-controls .timeline-reference-marker:focus-visible {background:white; border-color:currentColor;}
.floating-time-dock .timeline-controls .timeline-reference-marker.role-exit {background:#fff2e9; border-color:#efbb90; color:#a75017;}
.floating-time-dock .timeline-controls .timeline-reference-marker.is-etd { top:5px; }
.floating-time-dock .timeline-controls .timeline-reference-marker.is-overlap {top:12px;}
.floating-time-dock .timeline-controls .timeline-reference-marker:first-child {max-width:calc(100% - 8px);}
.floating-time-dock .meteo-lanes {
  grid-column:1/-1; display:grid; gap:0;
  border-top:1px solid #e0eaf0; padding-top:3px; min-width:0;
}
.floating-time-dock .meteo-lane {
  display:grid; grid-template-columns:148px minmax(0,1fr);
  gap:12px; align-items:center; min-width:0; padding:4px 0;
}
.floating-time-dock .meteo-lane-heading {display:grid; gap:1px; min-width:0;}
.floating-time-dock .meteo-lane-heading strong {font-size:11px; font-weight:700; color:#244959;}
.floating-time-dock .meteo-lane-heading small {font-size:9px; color:#627988; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.floating-time-dock .meteo-lane-values {
  display:grid; grid-template-columns:repeat(13,minmax(0,1fr));
  gap:0; margin-inline:48px; min-width:0;
}
.floating-time-dock .meteo-slot {
  min-width:0; min-height:37px; padding:3px 0 2px;
  border:0; border-radius:2px; background:transparent;
  display:flex; flex-direction:column; gap:2px; align-items:center;
  justify-content:center; color:#234c60; cursor:pointer;
  transition:background 130ms ease, color 130ms ease;
}
.floating-time-dock .meteo-slot + .meteo-slot {border-left:1px solid #edf2f5;}
.floating-time-dock .meteo-slot:not(:disabled):hover,
.floating-time-dock .meteo-slot:not(:disabled):focus-visible {background:#eaf4f7; outline-offset:-1px;}
.floating-time-dock .meteo-slot.is-active {color:#005b77; background:#e1f2f6; font-weight:800;}
.floating-time-dock .meteo-slot.is-missing {color:#b4c4cc; cursor:default; font-size:11px;}
.floating-time-dock .meteo-slot-glyph {
  display:block; font-size:13px; width:15px; height:15px; line-height:15px;
  text-align:center; transform:rotate(var(--meteo-bearing,0deg));
}
.floating-time-dock .meteo-slot strong {font-size:10px; font-weight:650; line-height:1.1; white-space:nowrap;}
.floating-time-dock .meteo-lane.wave .meteo-slot {color:#436d98;}
.floating-time-dock .meteo-lane.wave .meteo-slot.is-active {color:#254f80; background:#edf4fa;}
.floating-time-dock .meteo-lane.current .meteo-slot {color:#218078;}
.floating-time-dock .meteo-lane.current .meteo-slot.is-active {color:#08665e; background:#ebf8f4;}
.floating-time-dock .meteo-secondary {grid-column:1/-1; min-width:0; border:0; border-top:1px solid #edf1f4; padding:0; margin:0;}
.floating-time-dock .meteo-secondary > summary {
  list-style:none; font-size:10px; color:#4d7383;
  padding:5px 0 4px; display:flex; gap:8px; align-items:center;
  cursor:pointer; font-weight:650;
}
.floating-time-dock .meteo-secondary > summary::-webkit-details-marker {display:none;}
.floating-time-dock .meteo-secondary > summary span {color:#7a9ca9; font-size:11px; margin-left:auto;}
.floating-time-dock .meteo-secondary[open] > summary span {transform:rotate(180deg);}
.floating-time-dock .meteo-secondary .meteo-tracks {display:grid; gap:0; min-width:0;}
.floating-time-dock .meteo-secondary .meteo-lane {border-top:1px solid #f0f3f5;}

.floating-time-dock .meteo-status[hidden],
.floating-time-dock .meteo-lane-values[hidden],
.floating-time-dock .meteo-secondary[hidden] {display:none!important;}
.floating-time-dock .meteo-empty-state {font-size:10px; color:#748996; padding:3px 0;}
.floating-time-dock .evaluation-ships {min-width:0;}
/* Tarjetas compactas dentro del inspector de resultados. */
.workspace .evaluation-ships {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px; margin-top:3px;
}
.workspace .evaluation-ships[hidden] {display:none!important;}

.workspace .evaluation-ship.role-berth {--chip-role:#7c3aed;--chip-bg:#f5f0ff;}
.workspace .evaluation-ship.role-entry {--chip-role:#008577;--chip-bg:#ecf8f5;}
.workspace .evaluation-ship.role-exit {--chip-role:#e36b18;--chip-bg:#fff5ec;}
.workspace .evaluation-ship small {font-size:9px; text-transform:uppercase; letter-spacing:.5px; color:var(--chip-role); font-weight:750;}
.workspace .evaluation-ship strong {font-size:11px; line-height:1.3; color:#1e3742; font-weight:750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.workspace .evaluation-ships.has-three .evaluation-ship:last-child {grid-column:1/-1;}
@media (max-width:1260px) {
  .floating-time-dock .meteo-lane {grid-template-columns:96px minmax(0,1fr);gap:6px;}
  .floating-time-dock .meteo-lane-values {margin-inline:43px;}
}
@media (max-width:720px) {
  .floating-time-dock .meteo-lane {grid-template-columns:80px minmax(0,1fr);gap:5px;}
  .floating-time-dock .meteo-lane-values {margin-inline:37px;}
}
@media (max-width:490px) {
  .floating-time-dock .meteo-lane {grid-template-columns:65px minmax(0,1fr);}
  .floating-time-dock .meteo-lane-values {grid-template-columns:repeat(7,minmax(0,1fr));margin-inline:1px;}
  .floating-time-dock .meteo-slot:nth-child(even) {display:none;}
  .floating-time-dock .meteo-slot strong {font-size:9px;}
  .floating-time-dock .meteo-lane-heading strong {font-size:10px;}
  .floating-time-dock .meteo-lane-heading small {font-size:8px;}
}
@media (prefers-reduced-motion:reduce) {
  .floating-time-dock .meteo-slot,
  .floating-time-dock .timeline-controls .timeline-reference-marker {transition:none!important;}
}

/* V11.9.4: estado y reintento de la consulta meteoceánica. */
.floating-time-dock .meteo-status {
  display:flex; justify-content:flex-end; font-size:9px; color:#81929b;
  gap:6px; padding-top:2px;
  align-items:center; flex-wrap:wrap;
}
.floating-time-dock .meteo-retry {min-height:23px; padding:2px 8px; border:1px solid #b8cfdb; border-radius:6px; background:#f7fbfd; color:#276578; font-size:10px; cursor:pointer;}
.floating-time-dock .meteo-retry:hover {background:#e7f4f8; border-color:#77a9bd;}
.floating-time-dock .meteo-retry[hidden] {display:none!important;}


/* ========== model_v12.css ========== */
/* V12 — Visualización de franjas dictadas por el modelo; umbrales dobles. */
.workspace .band-chart.band-chart-v12 {
  min-height: 148px;
  height: auto;
  gap: 6px;
  padding: 4px 0 7px;
}
.workspace .band-chart-v12 .band-bar { min-width: 42px; gap: 3px; }
.workspace .band-chart-v12 .band-bar-track {
  position: relative;
  overflow: visible;
  border-radius: 4px;
  flex-shrink: 0;
}
.workspace .band-chart-v12 .band-bar-fill {
  border-radius: 3px 3px 1px 1px;
}
.workspace .band-chart-v12 .band-speed-threshold {
  position: absolute;
  display: block;
  left: -1px;
  right: -1px;
  height: 0;
  z-index: 3;
  pointer-events: none;
}
.workspace .band-chart-v12 .band-speed-threshold.warning { border-top: 2px dashed #A98231; }
.workspace .band-chart-v12 .band-speed-threshold.critical { border-top: 2px solid #BB4742; }
.workspace .band-chart-v12 .band-direction {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: #385D70;
}
.workspace .band-chart-v12 .band-bar[data-direction="down"] .band-direction { color: #A46640; }
.workspace .band-chart-v12 .band-label { font-size: 11px; }
.workspace .band-chart-v12 .band-distance { font-size: 10px; }
.workspace .speed-criteria {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 0 6px;
}
.workspace .speed-limit {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #E1E8EE;
  background: #F7F9FB;
  font-size: 10px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.workspace .speed-limit.within { color:#126B55; background:#EAF6F1; border-color:#C7E5DB; }
.workspace .speed-limit.partial { color:#95661B; background:#FFF6E5; border-color:#F0DEB3; }
.workspace .speed-limit.attention { color:#A63D34; background:#FDEDE9; border-color:#F2D0CB; }
.workspace .band-bar.partial .band-bar-fill {background:#D1A047;}
.workspace .band-bar.attention .band-bar-fill {background:#BD463D;}
.band-map-direction { background:transparent; border:0; pointer-events:none; }
.band-direction-glyph {
  display:grid;place-items:center;width:25px;height:25px;
  color:white;background:#16785F;border-radius:50%;border:2px solid white;
  box-shadow:0 2px 7px rgba(22,41,51,.3);font:900 16px/1 system-ui,sans-serif;
}
.band-direction-glyph.partial { background:#C48D32; }
.band-direction-glyph.attention { background:#BD463D; }
.band-direction-glyph.unconfigured { background:#85929E; }
/* Administrador: dos columnas por criterio. */
.admin-threshold-table { min-width: 710px; }
.settings-threshold-table th, .settings-threshold-table td { white-space: normal; }
.admin-threshold-table input { min-width: 62px; max-width: 84px; width: 100%; }
.threshold-speed-row { background: #F2F8FB; }
.threshold-speed-row th { color: #174E66; }
@media (max-width: 720px) {
  .workspace .speed-criteria { gap:4px; }
  .workspace .speed-limit { font-size:9px; padding:3px 6px; }
  .workspace .band-chart-v12 .band-bar { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .band-direction-glyph, .band-bar, .band-bar-fill { transition:none !important; }
}


/* ========== scenario_v128.css ========== */
/* COMPASS+ V12.8 — Etiquetas e interfaz de escenario (sin cambios en datos reales). */
.workspace .vessel-dimensions {
  display: block;
  color: #486575;
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 550;
  margin-top: 2px;
}
.workspace .evaluation-ship {
  min-width:0; padding:8px 9px; border-radius:8px;
  border:1px solid #d8e4e9; border-left:4px solid var(--chip-role);
  background:var(--chip-bg); display:flex; flex-direction:column; gap:2px;
  min-height: 56px; align-content: start;
}
.workspace .evaluation-ship .evaluation-ship-dimensions {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  color: #486575;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.workspace .role-card [data-edit-role][hidden] { display: none !important; }
/* Mantener los marcadores táctiles, pero sin interacciones por mouseover. */
@media (hover: hover) and (pointer: fine) {
  .ship-arrow:hover .ship-glyph-shell > svg,
  .ship-arrow.is-assigned:hover .ship-marker-assigned > svg { scale: 1; filter: none; }
}

/* V12.13: las posiciones asignadas para evaluación son hipótesis, no AIS. */
.ship-arrow.is-simulated .ship-marker-assigned.is-virtual { filter: none; }
.ship-arrow.is-simulated .ship-marker-assigned.is-virtual::before {
  content: ''; position: absolute; inset: 3px;
  border: 2px dashed var(--marker-role, #597889);
  border-radius: 50%; background: rgba(255,255,255,.13);
  pointer-events: none; z-index: 1;
}
.ship-arrow.is-simulated .ship-marker-assigned.is-virtual > svg { opacity: .60; }
.ship-arrow.is-simulated .ship-marker-assigned.is-virtual .ship-marker-badge { z-index: 2; }
.ship-arrow.is-simulated .ship-virtual-label {
  position: absolute; z-index: 3; left: 50%; top: -13px;
  transform: translateX(-50%); padding: 2px 5px;
  border-radius: 5px; background: white; border: 1px dashed var(--marker-role, #58798b);
  color: #304e5f; font: 700 9px/1.2 system-ui, sans-serif;
  white-space: nowrap; box-shadow: 0 1px 4px #102c3920;
  pointer-events: none;
}
.ship-role-tooltip .ais-vessel-details,
.workspace .vessel .ais-vessel-details { min-width: 0; }
.ship-role-tooltip .ship-marinetraffic-link,
.workspace .vessel .ship-marinetraffic-link { display: inline-block; font-size: 11px; font-weight: 650; color: #0c718d; padding: 4px 0; }
.ship-role-tooltip .ship-marinetraffic-link:focus-visible,
.workspace .vessel .ship-marinetraffic-link:focus-visible { outline: 2px solid #0c718d; outline-offset: 2px; }
.workspace .vessel.has-ship-details { flex-wrap: wrap; }
.ais-vessel-details { margin: .4rem 0 .15rem; padding: .45rem .6rem; background: #f5f9fb; border: 1px solid #d7e5e9; border-radius: 7px; font-size: 10.5px; }
.ais-vessel-details > summary { cursor: pointer; font-weight: 700; }
.ais-vessel-details > dl { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 9px; margin: 8px 0 0; }
.ais-vessel-details dt { color: #577381; }
.ais-vessel-details dd { color: #1c3947; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.workspace .vessel > .ais-vessel-details { flex-basis: 100%; width: 100%; }



.ship-hover-tooltip.leaflet-tooltip { background:#fff; border:1px solid #d6e6ec; color:#173246; border-radius:999px; box-shadow:0 10px 24px rgba(15,35,52,.16); padding:5px 9px; }
.ship-hover-tooltip::before { border-top-color:#d6e6ec !important; }
.ship-hover-line { display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:700; }
.ship-hover-dot { width:9px; height:9px; border-radius:50%; display:inline-block; box-shadow:0 0 0 2px #fff, 0 0 0 3px rgba(15,98,122,.18); }


/* La línea temporal no debe aparecer bajo el mapa cuando está oculta. */
.workspace .floating-time-dock[hidden] { display:none !important; }

/* COMPASS+ V12.34 · tarjetas de resultado neutrales, sin borde lateral ni pastel. */
.workspace .evaluation-ship, .workspace .evaluation-ship.role-berth,
.workspace .evaluation-ship.role-entry, .workspace .evaluation-ship.role-exit {
  border:1px solid #E2E8F0;border-radius:6px;padding:8px 10px;
  background:#F8FAFC;gap:3px;min-height:0;
}
.workspace .evaluation-ship.role-berth {--chip-role:#7c3aed;}
.workspace .evaluation-ship.role-entry {--chip-role:#008577;}
.workspace .evaluation-ship.role-exit {--chip-role:#e36b18;}
.workspace .evaluation-ship > small:first-child {display:inline-flex;align-items:center;gap:6px;}
.workspace .evaluation-ship-role-dot {display:inline-block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:var(--chip-role);}
.workspace .evaluation-ship .evaluation-ship-dimensions {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#selectedShipsSummary {gap:6px;}
#selectedShipsSummary .summary-ship {border:1px solid #E2E8F0!important;border-radius:6px;background:#F8FAFC;padding:8px 10px;}
#selectedShipsSummary .summary-ship-text {gap:3px;}
#selectedShipsSummary .summary-ship-role {display:inline-flex;align-items:center;gap:6px;font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.4px;color:#475569;}
#selectedShipsSummary .summary-ship-role i {display:inline-block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:#7c3aed;}
#selectedShipsSummary .summary-ship.entry .summary-ship-role i {background:#008577;}
#selectedShipsSummary .summary-ship.exit .summary-ship-role i {background:#e36b18;}
