/* Estilos personalizados Rutero Pro - Mobile First */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #0f172a;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-light: #f8fafc;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

body {
  background-color: var(--bg-light);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  padding-bottom: 85px; /* Espacio para la barra de navegación inferior en móviles */
}

/* Header Navbar */
.navbar-rutero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Barra de Navegación Inferior (Mobile Bottom Bar) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1040;
  border-top: 1px solid #e2e8f0;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.bottom-nav-item i {
  font-size: 1.35rem;
  margin-bottom: 2px;
}

.bottom-nav-item.active {
  color: var(--primary-color);
  font-weight: 700;
  transform: translateY(-2px);
}

/* Tarjetas de Clientes en Ruta */
.cliente-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.cliente-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.cliente-card.estado-cobrado {
  border-left: 6px solid var(--success-color);
}

.cliente-card.estado-pendiente {
  border-left: 6px solid var(--primary-color);
}

.cliente-card.estado-no_atendido {
  border-left: 6px solid var(--warning-color);
}

.cliente-card.estado-reprogramado {
  border-left: 6px solid #8b5cf6;
}

.orden-badge {
  font-size: 1.15rem;
  font-weight: 800;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: #f1f5f9;
  color: #0f172a;
}

.orden-badge.cobrado {
  background-color: #d1fae5;
  color: #065f46;
}

/* Botones GPS Destacados */
.btn-gps-maps {
  background-color: #1a73e8;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  border: none;
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
  transition: all 0.2s ease;
}

.btn-gps-maps:hover, .btn-gps-maps:active {
  background-color: #1557b0;
  color: white;
  transform: scale(1.02);
}

.btn-gps-waze {
  background-color: #33ccff;
  color: #0f172a;
  font-weight: 600;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 0.85rem;
  border: none;
  box-shadow: 0 2px 4px rgba(51, 204, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-gps-waze:hover, .btn-gps-waze:active {
  background-color: #00bfff;
  color: #0f172a;
  transform: scale(1.02);
}

/* Lista de Reordenamiento (Drag & Drop) */
.sortable-ghost {
  opacity: 0.4;
  background: #dbeafe !important;
  border: 2px dashed #2563eb !important;
}

.sortable-drag {
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.drag-handle {
  cursor: grab;
  color: #94a3b8;
  padding: 8px;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Barra de Progreso de Jornada */
.progress-jornada {
  height: 12px;
  border-radius: 6px;
  background-color: #e2e8f0;
}

/* Indicadores de Conexión */
.badge-offline {
  background-color: #ef4444;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Botones flotantes o rápidos */
.quick-action-btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}

/* Mejoras para escritorio */
@media (min-width: 992px) {
  body {
    padding-bottom: 20px;
  }
  .mobile-bottom-nav {
    display: none;
  }
  .desktop-nav {
    display: flex !important;
  }
}

@media (max-width: 991px) {
  .desktop-nav {
    display: none !important;
  }
}
