/* ==========================================================================
   Herramienta: Rastreador de barcos y entrega de tu BYD (atto3_barcos.css)
   Diseñado específicamente para compradores y propietarios de vehículos BYD
   Soporte Multi-Tema Completo (Dark / Light) con Persistencia y 100% Responsivo
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables de Tema: Modo Oscuro (Por Defecto)
   -------------------------------------------------------------------------- */
:root,
[data-theme='dark'],
html[data-theme='dark'],
body[data-theme='dark'],
body.dark-theme,
body.dark-mode,
[data-bs-theme='dark'] {
  --ship-bg-page: radial-gradient(circle at top center, #1a2332 0%, #0d1117 80%);
  --ship-primary: #38bdf8;
  --ship-primary-hover: #7dd3fc;
  --ship-primary-subtle: rgba(56, 189, 248, 0.15);
  --ship-accent: #22d3ee;
  --ship-success: #34d399;
  --ship-warning: #fbbf24;
  
  --ship-card-bg: rgba(22, 28, 36, 0.92);
  --ship-card-bg-solid: #161c24;
  --ship-card-border: rgba(255, 255, 255, 0.12);
  --ship-card-hover: rgba(30, 41, 59, 0.95);
  
  --ship-text-main: #f8fafc;
  --ship-text-sub: #cbd5e1;
  --ship-text-muted: #94a3b8;
  
  --ship-bg-soft: rgba(15, 23, 42, 0.75);
  --ship-chip-bg: #1e293b;
  --ship-input-bg: #0f172a;
  --ship-input-border: rgba(255, 255, 255, 0.18);
  --ship-input-text: #f8fafc;
  
  --ship-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  --ship-shadow-lg: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
  --theme-toggle-color: #ff9f43;
}

/* --------------------------------------------------------------------------
   Variables de Tema: Modo Claro
   -------------------------------------------------------------------------- */
[data-theme='light'],
html[data-theme='light'],
body[data-theme='light'],
body.light-theme,
[data-bs-theme='light'] {
  --ship-bg-page: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --ship-primary: #0284c7;
  --ship-primary-hover: #0369a1;
  --ship-primary-subtle: rgba(2, 132, 199, 0.1);
  --ship-accent: #0891b2;
  --ship-success: #059669;
  --ship-warning: #d97706;
  
  --ship-card-bg: #ffffff;
  --ship-card-bg-solid: #ffffff;
  --ship-card-border: rgba(0, 0, 0, 0.12);
  --ship-card-hover: #f8fafc;
  
  --ship-text-main: #0f172a;
  --ship-text-sub: #334155;
  --ship-text-muted: #64748b;
  
  --ship-bg-soft: #f1f5f9;
  --ship-chip-bg: #e2e8f0;
  --ship-input-bg: #ffffff;
  --ship-input-border: #cbd5e1;
  --ship-input-text: #0f172a;
  
  --ship-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --ship-shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.12);
  --theme-toggle-color: #d97706;
}

/* --------------------------------------------------------------------------
   Estructura Global y Contenedor Canónico Atto 3
   -------------------------------------------------------------------------- */
body {
  background: var(--ship-bg-page) !important;
  color: var(--ship-text-main) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

.barcos-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
}

@media (max-width: 768px) {
  .barcos-container {
    padding: 1rem 0.75rem 2.5rem;
  }
}

/* Tipografía */
.ship-font-mono {
  font-family: 'JetBrains Mono', monospace !important;
}

.ship-font-heading {
  font-family: 'Outfit', sans-serif !important;
}

/* --------------------------------------------------------------------------
   Botón Flotante para Alternar Tema
   -------------------------------------------------------------------------- */
.theme-toggle {
  position: fixed;
  top: 90px;
  right: 25px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  color: var(--ship-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
  color: var(--ship-primary);
}

.theme-toggle i {
  font-size: 1.25rem;
  color: var(--theme-toggle-color);
}

@media (max-width: 768px) {
  .theme-toggle {
    top: auto;
    bottom: 25px;
    right: 20px;
  }
}

/* --------------------------------------------------------------------------
   Hero Card
   -------------------------------------------------------------------------- */
.buyer-hero-card {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--ship-shadow);
}

.ship-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: var(--ship-primary-subtle);
  border: 1px solid var(--ship-primary);
  color: var(--ship-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.ship-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ship-primary-subtle);
  color: var(--ship-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Calculadora Interactiva para Compradores
   -------------------------------------------------------------------------- */
.calc-card {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--ship-shadow-lg);
}

.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ship-text-main);
}

.calc-select,
.calc-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0.5rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid var(--ship-input-border);
  background: var(--ship-input-bg);
  color: var(--ship-input-text);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.calc-select option {
  background: var(--ship-card-bg-solid);
  color: var(--ship-text-main);
}

.calc-select:focus,
.calc-input:focus {
  outline: none;
  border-color: var(--ship-primary);
  box-shadow: 0 0 0 3px var(--ship-primary-subtle);
}

/* Decodificador de VIN BYD */
.vin-decoder-box {
  background: var(--ship-bg-soft);
  border: 1px dashed var(--ship-card-border);
  border-radius: 1rem;
  padding: 1.15rem 1.35rem;
  transition: all 0.25s ease;
}

.vin-decoder-box.has-valid-vin {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.5);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 70%), var(--ship-bg-soft);
}

.vin-input-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.vin-input-container input {
  padding-right: 42px;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.btn-clear-vin {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ship-text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-clear-vin:hover {
  color: #ef4444;
}

.vin-feedback-card {
  background: var(--ship-card-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
  animation: fadeIn 0.3s ease;
}

.vin-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--ship-card-border);
  margin-bottom: 0.75rem;
}

.vin-feedback-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ship-success);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vin-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.vin-info-box {
  background: var(--ship-bg-soft);
  border: 1px solid var(--ship-card-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.vin-info-box-label {
  font-size: 0.72rem;
  color: var(--ship-text-muted);
  display: block;
  margin-bottom: 0.15rem;
}

.vin-info-box-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ship-text-main);
  display: block;
}

.calc-btn-action {
  width: 100%;
  height: 50px;
  min-height: 40px;
  border: none;
  border-radius: 0.75rem;
  background: var(--ship-primary);
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.calc-btn-action:hover {
  background: var(--ship-primary-hover);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Barra de Progreso por Pasos del Pedido
   -------------------------------------------------------------------------- */
.buyer-result-box {
  background: var(--ship-bg-soft);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.15rem;
  padding: 2rem;
}

.delivery-progress-wrapper {
  position: relative;
  margin: 1.5rem 0 2.5rem;
}

.delivery-progress-bar-bg {
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 6px;
  background: var(--ship-card-border);
  border-radius: 3px;
  z-index: 1;
}

.delivery-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ship-primary), var(--ship-success));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.delivery-steps-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.step-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
}

.step-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ship-card-bg);
  border: 2px solid var(--ship-card-border);
  color: var(--ship-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ship-text-muted);
  line-height: 1.2;
}

.step-point.completed .step-dot {
  background: var(--ship-primary);
  border-color: var(--ship-primary);
  color: #0f172a;
  box-shadow: 0 0 12px var(--ship-primary-subtle);
}

.step-point.completed .step-label {
  color: var(--ship-text-main);
}

.step-point.active .step-dot {
  background: var(--ship-success);
  border-color: var(--ship-success);
  color: #0f172a;
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

.step-point.active .step-label {
  color: var(--ship-success);
  font-weight: 800;
}

@media (max-width: 768px) {
  .delivery-progress-bar-bg {
    display: none;
  }
  .delivery-steps-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem 0.5rem;
  }
  .step-point {
    width: 100%;
    min-width: 0;
  }
  .step-dot {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .step-label {
    font-size: 0.72rem;
  }
}

/* Tarjetas de Resultados */
.calc-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
}

.calc-timeline-card {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1rem;
  padding: 1.35rem;
  text-align: center;
  box-shadow: var(--ship-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.calc-timeline-card.highlight-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: radial-gradient(circle at top center, rgba(16, 185, 129, 0.1), transparent 70%), var(--ship-card-bg);
}

.calc-timeline-icon {
  font-size: 1.8rem;
  color: var(--ship-primary);
  margin-bottom: 0.4rem;
}

.calc-timeline-label {
  font-size: 0.82rem;
  color: var(--ship-text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.calc-timeline-date {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ship-text-main);
  font-family: 'JetBrains Mono', monospace;
}

/* --------------------------------------------------------------------------
   Visor de Mapa Satélite en Vivo
   -------------------------------------------------------------------------- */
.map-viewer-card {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--ship-shadow-lg);
}

.map-viewer-header {
  padding: 1.25rem 1.5rem;
  background: var(--ship-bg-soft);
  border-bottom: 1px solid var(--ship-card-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.map-viewer-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ship-text-main);
}

/* Contenedor Split del Mapa y Panel Lateral */
.map-split-container {
  display: flex;
  position: relative;
  width: 100%;
  min-height: 560px;
  background: var(--ship-card-bg);
}

.map-split-left {
  flex: 1 1 65%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0f172a;
}

#fleetLeafletMap {
  flex: 1 1 400px;
  min-height: 380px;
  width: 100%;
  position: relative;
}

/* Tarjeta Visual de Inspección del Buque (debajo del mapa) */
.vessel-showcase-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.95rem 1.25rem;
  background: var(--ship-card-bg-solid);
  border-top: 1px solid var(--ship-card-border);
  min-height: 140px;
  flex-shrink: 0;
}

.vessel-showcase-img-box {
  position: relative;
  width: 210px;
  height: 118px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ship-card-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.vessel-showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.vessel-showcase-img-box:hover .vessel-showcase-img {
  transform: scale(1.06);
}

.vessel-showcase-img-overlay {
  position: absolute;
  bottom: 6px;
  left: 6px;
  pointer-events: none;
}

.vessel-showcase-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vessel-showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vessel-tag-pill {
  background: var(--ship-bg-soft);
  border: 1px solid var(--ship-card-border);
  color: var(--ship-text-sub);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

[data-theme='light'] .vessel-showcase-bar {
  background: #ffffff;
}

[data-theme='light'] .vessel-showcase-img-box {
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .vessel-tag-pill {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
}

.map-split-sidebar {
  flex: 0 0 380px;
  width: 380px;
  max-width: 380px;
  background: var(--ship-bg-soft);
  border-left: 1px solid var(--ship-card-border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-header-box {
  border-bottom: 1px solid var(--ship-card-border);
  padding-bottom: 0.85rem;
}

.sidebar-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  padding: 0.45rem 0.75rem;
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 8px;
}

.sidebar-metric-label {
  color: var(--ship-text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.sidebar-metric-val {
  color: var(--ship-text-main);
  font-weight: 700;
  text-align: right;
}

.sidebar-desc-box {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ship-text-sub);
}

.sidebar-actions-box {
  margin-top: 0.5rem;
}

.sidebar-actions-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ship-text-muted);
  display: block;
}

@media (max-width: 992px) {
  .map-split-container {
    flex-direction: column;
  }
  .map-split-left {
    flex: 1 1 100%;
    width: 100%;
    height: 420px;
  }
  .map-split-sidebar {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-top: 1px solid var(--ship-card-border);
  }
}

/* Estilos de Marcadores Personalizados de Buques en Leaflet */
.custom-ship-marker {
  background: transparent;
  border: none;
}

.ship-marker-box {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0284c7;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.ship-marker-box:hover {
  transform: scale(1.2);
  z-index: 1000 !important;
}

.ship-marker-box.special-flagship {
  background: #0284c7;
  border-color: #38bdf8;
}

.ship-marker-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: shipPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.ship-marker-tag {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* Marcadores de Puertos */
.custom-port-marker {
  background: transparent;
  border: none;
}

.port-marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

/* Popups de Leaflet */
.leaflet-popup-content-wrapper {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem !important;
  box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.7) !important;
  padding: 0 !important;
}

[data-theme='light'] .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2) !important;
}

.leaflet-popup-tip {
  background: #0f172a !important;
}

[data-theme='light'] .leaflet-popup-tip {
  background: #ffffff !important;
}

.leaflet-popup-content {
  margin: 1.15rem !important;
  line-height: 1.5;
}

.leaflet-ship-popup {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ship-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.5rem;
}

[data-theme='light'] .ship-popup-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ship-popup-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

[data-theme='light'] .ship-popup-desc {
  color: #334155;
}

.ship-popup-meta {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

[data-theme='light'] .ship-popup-meta {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ship-popup-meta div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ship-popup-meta span {
  color: #94a3b8;
}

[data-theme='light'] .ship-popup-meta span {
  color: #64748b;
}

.ship-popup-meta strong {
  color: #f8fafc;
  font-weight: 700;
}

[data-theme='light'] .ship-popup-meta strong {
  color: #0f172a;
}

.ship-popup-meta code {
  color: #38bdf8;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme='light'] .ship-popup-meta code {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
}

.ship-popup-links {
  margin-top: 0.25rem;
}

.ship-popup-links .btn {
  font-weight: 600;
  font-size: 0.8rem;
}

.vessel-selector-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  padding: 0;
}

.vessel-pill-btn {
  flex: 1 1 calc(25% - 0.6rem);
  min-width: 175px;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--ship-card-border);
  background: var(--ship-card-bg);
  color: var(--ship-text-main);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--ship-shadow);
}

.vessel-pill-btn:hover {
  border-color: var(--ship-primary);
  color: var(--ship-primary);
  transform: translateY(-1px);
}

.vessel-pill-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22) 0%, rgba(3, 105, 161, 0.38) 100%);
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(3, 105, 161, 0.45), inset 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.vessel-pill-btn.active .badge {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  opacity: 1 !important;
}

[data-theme='light'] .vessel-pill-btn.active {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-color: #0284c7;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

[data-theme='light'] .vessel-pill-btn.active .badge {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
}

@media (max-width: 992px) {
  .vessel-pill-btn {
    flex: 1 1 calc(50% - 0.6rem);
  }
}

@media (max-width: 576px) {
  .vessel-pill-btn {
    flex: 1 1 100%;
  }
}

.ship-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ship-success);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.ship-live-dot.dot-ais-live {
  background: var(--ship-success);
}

.ship-live-dot.dot-route-est {
  background: #38bdf8;
}

.ship-live-dot.pulsing::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid var(--ship-success);
  animation: shipPulse 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.ship-live-dot.dot-route-est.pulsing::after {
  border-color: #38bdf8;
}

@keyframes shipPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map-viewer-footer {
  padding: 0.95rem 1.5rem;
  background: var(--ship-bg-soft);
  border-top: 1px solid var(--ship-card-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ship-text-muted);
}

/* --------------------------------------------------------------------------
   Diccionario del Comercial (Traductor de Frases)
   -------------------------------------------------------------------------- */
.decoder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.decoder-card {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.15rem;
  padding: 1.5rem;
  box-shadow: var(--ship-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.decoder-card:hover {
  transform: translateY(-2px);
  border-color: var(--ship-primary);
}

.decoder-card.highlight-decoder {
  border-color: rgba(16, 185, 129, 0.4);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 70%), var(--ship-card-bg);
}

.decoder-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.decoder-bubble-icon {
  font-size: 1.3rem;
  color: var(--ship-primary);
  flex-shrink: 0;
}

.decoder-saying {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ship-text-main);
  margin: 0;
  line-height: 1.4;
}

.decoder-meaning {
  font-size: 0.9rem;
  color: var(--ship-text-sub);
  line-height: 1.6;
  margin: 0;
}

.decoder-footer-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ship-primary);
  background: var(--ship-chip-bg);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  width: fit-content;
}

/* --------------------------------------------------------------------------
   Checklist de Preparación
   -------------------------------------------------------------------------- */
.checklist-wrapper {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--ship-shadow);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.checklist-item {
  background: var(--ship-bg-soft);
  border: 1px solid var(--ship-card-border);
  border-radius: 1rem;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checklist-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.checklist-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ship-text-main);
  margin: 0;
}

.checklist-item-desc {
  font-size: 0.88rem;
  color: var(--ship-text-sub);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Acordeón de FAQs
   -------------------------------------------------------------------------- */
.faqs-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--ship-card-bg);
  border: 1px solid var(--ship-card-border);
  border-radius: 0.95rem;
  overflow: hidden;
  box-shadow: var(--ship-shadow);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ship-text-main);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--ship-primary);
}

.faq-icon-arrow {
  transition: transform 0.3s ease;
  color: var(--ship-text-muted);
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--ship-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  font-size: 0.92rem;
  color: var(--ship-text-sub);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.35rem;
}

#vesselSpainBadge {
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme='light'] #vesselSpainBadge.bg-success-subtle {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

[data-theme='light'] #vesselSpainBadge.bg-secondary-subtle {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

