* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  overflow-x: hidden;
}

.header {
  background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  background: white;
  color: #059669;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 20px;
  text-transform: lowercase;
  white-space: nowrap;
}

.logo-text {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  display: none;
}

.divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  display: none;
}

.login-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.nav-bar {
  background: white;
  padding: 2px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
  gap: 60px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  color: #9ca3af;
  transition: color 0.2s;
  border-radius: 8px;
  min-width: 50px;
  flex-shrink: 0;
}

.nav-icon.active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.main-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  position: relative;
}

.sidebar {
  width: 100%;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  order: 2;
}

.sidebar h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.sidebar p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.geo-section {
  margin-bottom: 16px;
}

.geo-btn {
  width: 100%;
  padding: 12px 16px;
  background: #d1fae5;
  color: #059669;
  border: 1px solid #10b981;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.geo-btn:hover {
  background: #a7f3d0;
}

.geo-btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.manual-form-container {
  width: 100%;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 50vh;
  -webkit-overflow-scrolling: touch;
  order: 1;
}

.manual-form-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.manual-form-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.manual-form-header p {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 0;
}

.manual-form {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-tabs {
  display: none;
}

.tab-btn {
  display: none;
}

.tab-content {
  display: block !important;
}

#localizacion-tab {
  display: none !important;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.required {
  color: #ef4444;
}

.form-select,
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  background: white;
  transition: all 0.2s;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-select:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

.register-manual-btn {
  width: 100%;
  padding: 12px 16px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 16px;
}

.register-manual-btn:hover {
  background: #047857;
}

.register-manual-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.localization-info {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  display: none;
}

.info-icon {
  width: 60px;
  height: 60px;
  background: #f0f9ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #3b82f6;
}

.localization-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.localization-info p {
  line-height: 1.6;
  font-size: 14px;
}

.map-container {
  flex: 1;
  position: relative;
  background: #f8fafc;
  min-height: 300px;
  order: 3;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.search-container {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
}

.search-box {
  display: flex;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid transparent;
  transition: all 0.3s;
}

.search-box:focus-within {
  border-color: #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.search-input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 15px;
  color: #374151;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-btn {
  background: #10b981;
  color: white;
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #059669;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
}

.search-suggestion {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.search-suggestion:hover {
  background: #f9fafb;
}

.search-suggestion:last-child {
  border-bottom: none;
}

.suggestion-title {
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
  font-size: 13px;
}

.suggestion-address {
  font-size: 11px;
  color: #6b7280;
}

.map-controls {
  position: absolute;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.zoom-controls {
  display: flex;
  flex-direction: column;
}

.zoom-btn {
  width: 48px;
  height: 48px;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #374151;
  transition: all 0.2s;
}

.zoom-btn:hover {
  background: #f3f4f6;
  color: #10b981;
}

.zoom-btn:first-child {
  border-bottom: 1px solid #e5e7eb;
}

.map-view-controls {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.view-toggle-btn {
  width: 48px;
  height: 48px;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #374151;
  transition: all 0.2s;
  position: relative;
}

.view-toggle-btn:hover {
  background: #f3f4f6;
  color: #10b981;
}

.view-toggle-btn.active {
  background: #10b981;
  color: white;
}

.view-toggle-btn:first-child {
  border-bottom: 1px solid #e5e7eb;
}

.view-toggle-btn svg {
  width: 22px;
  height: 22px;
}

.register-btn {
  position: absolute;
  bottom: 60px; /* Cambiado de 120px a 60px */
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
  white-space: nowrap;
}

.register-btn:hover {
  background: #059669;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.register-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.address-popup {
  position: absolute;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: none;
  min-width: 200px;
  font-size: 14px;
  color: #374151;
}

.address-popup.show {
  display: block;
}

.address-popup::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.navigation-controls {
  position: absolute;
  bottom: 5px; /* Cambiado de 10px a 5px */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 1000;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-btn.secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.nav-btn.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.nav-btn.primary {
  background: #10b981;
  color: white;
}

.nav-btn.primary:hover {
  background: #059669;
}

.nav-btn.primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* ESTILOS PARA LA LISTA DE UBICACIONES */
.locations-list {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* ASEGURAR QUE SIEMPRE SEA VISIBLE */
  display: block !important;
  visibility: visible !important;
}

.location-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
  position: relative;
  /* ASEGURAR QUE SIEMPRE SEA VISIBLE */
  display: block !important;
  visibility: visible !important;
}

.location-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.location-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.location-address {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.location-coords {
  font-size: 11px;
  color: #9ca3af;
  font-family: monospace;
}

.location-type {
  font-size: 11px;
  color: #059669;
  font-weight: 500;
  margin-top: 2px;
}

.location-info {
  flex: 1;
}

.location-address-main {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  margin: 2px 0;
  line-height: 1.2;
}

.location-address-details {
  font-size: 11px;
  color: #6b7280;
  margin: 2px 0;
  line-height: 1.3;
}

.address-detail {
  display: inline-block;
  margin-right: 8px;
}

.location-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
}

.delete-btn {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.delete-btn:hover {
  background: #fecaca;
}

/* OTROS ESTILOS EXISTENTES... */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  display: none;
}

.tutorial-tooltip {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 3001;
  animation: fadeInScale 0.3s ease;
}

.tutorial-tooltip h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}

.tutorial-tooltip p {
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 16px;
  font-size: 14px;
}

.tutorial-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-progress {
  font-size: 12px;
  color: #9ca3af;
}

.tutorial-buttons {
  display: flex;
  gap: 8px;
}

.tutorial-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.tutorial-btn.skip {
  background: #f3f4f6;
  color: #6b7280;
}

.tutorial-btn.skip:hover {
  background: #e5e7eb;
}

.tutorial-btn.next {
  background: #10b981;
  color: white;
}

.tutorial-btn.next:hover {
  background: #059669;
}

.tutorial-btn.finish {
  background: #059669;
  color: white;
}

.tutorial-btn.finish:hover {
  background: #047857;
}

.tutorial-arrow {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 3002;
}

.tutorial-arrow.top {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid white;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.tutorial-arrow.bottom {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid white;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.tutorial-arrow.left {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid white;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.tutorial-arrow.right {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid white;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.02);
  }
}

.current-marker {
  width: 24px;
  height: 24px;
  background: #ef4444;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.current-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.registered-marker {
  width: 28px;
  height: 28px;
  background: #10b981;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.registered-marker::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.manual-marker {
  width: 28px;
  height: 28px;
  background: #f59e0b;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.manual-marker::after {
  content: "📝";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

.loading {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  z-index: 2000;
  animation: slideInNotification 0.3s ease;
  max-width: 350px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success {
  background: #10b981;
}
.notification.error {
  background: #ef4444;
}
.notification.warning {
  background: #f59e0b;
}
.notification.info {
  background: #3b82f6;
}

@keyframes slideInNotification {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  animation: fadeInUp 0.8s ease;
  padding: 0 20px;
}

.loader-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3);
  position: relative;
  animation: pulse 2s infinite;
}

.loader-icon::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  animation: rotate 3s linear infinite;
}

.loader-icon svg {
  width: 32px;
  height: 32px;
  color: white;
  animation: bounce 1.5s infinite;
}

.loader-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 6px;
  letter-spacing: -0.025em;
}

.loader-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.4;
}

.loader-progress {
  width: 150px;
  height: 3px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 2px;
  animation: loading 2s ease-in-out infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ===== MEDIA QUERIES PARA MÓVILES ===== */

/* Móviles pequeños (320px - 480px) */
@media (max-width: 480px) {
  .header {
    padding: 6px 12px;
  }

  .logo {
    font-size: 14px;
    padding: 4px 8px;
  }

  .login-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .nav-bar {
    padding: 6px 8px;
    gap: 4px;
  }

  .nav-icon {
    padding: 6px 4px;
    min-width: 45px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .main-container {
    flex-direction: column;
    height: calc(100vh - 120px); /* Ajustado para dar más espacio */
  }

  /* FORMULARIO MANUAL - ORDEN 1 - REVERTIR A ORIGINAL */
  .manual-form-container {
    order: 1;
    width: 100%;
    max-height: 25vh; /* REVERTIDO de 35vh a 25vh original */
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  /* SIDEBAR CON UBICACIONES - ORDEN 2 - REVERTIR A ORIGINAL */
  .sidebar {
    order: 2;
    padding: 12px 8px;
    max-height: 50vh; /* REVERTIDO de 60vh a 50vh original */
    min-height: 200px; /* REVERTIDO de 250px a 200px original */
    border-bottom: 1px solid #e5e7eb;
  }

  /* LISTA DE UBICACIONES - SOLO ESTA AUMENTAR */
  .locations-list {
    margin-top: 12px;
    max-height: 450px; /* AUMENTADO de 250px a 400px */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-item {
    padding: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-title {
    font-size: 14px;
  }

  .location-address-main {
    font-size: 12px;
  }

  .location-address-details {
    font-size: 11px;
  }

  .delete-btn {
    padding: 4px 6px;
    font-size: 11px;
  }

  /* MAPA - ORDEN 3 - REVERTIR A ORIGINAL */
  .map-container {
    order: 3;
    min-height: 25vh; /* REVERTIDO de 20vh a 25vh original */
    padding: 8px;
  }

  .search-container {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .search-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .search-btn {
    padding: 10px 12px;
    min-width: 44px;
  }

  .map-controls {
    top: 55px;
    right: 8px;
  }

  .zoom-btn,
  .view-toggle-btn {
    width: 36px;
    height: 36px;
  }

  .register-btn {
    position: fixed; /* Cambiado de absolute a fixed */
    bottom: 80px; /* Cambiado de 60px a 80px para dar más espacio */
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    font-size: 13px;
    z-index: 1001;
  }

  .navigation-controls {
    position: fixed; /* Cambiado de absolute a fixed */
    bottom: 15px; /* Cambiado de 10px a 15px */
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    z-index: 1001;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* TUTORIALES OPTIMIZADOS PARA MÓVILES PEQUEÑOS */
  /* TUTORIALES MÁS PEQUEÑOS PARA MÓVILES PEQUEÑOS */
  .tutorial-tooltip {
    max-width: 220px !important;
    padding: 8px !important;
    margin: 4px !important;
    border-radius: 6px !important;
    /* Asegurar que no se salga de la pantalla */
    left: 4px !important;
    right: 4px !important;
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
  }

  .tutorial-tooltip h3 {
    font-size: 12px !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }

  .tutorial-tooltip p {
    font-size: 10px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
  }

  .tutorial-controls {
    flex-direction: column !important;
    gap: 4px !important;
    align-items: stretch !important;
  }

  .tutorial-progress {
    font-size: 8px !important;
    text-align: center !important;
    order: 2 !important;
    margin-top: 2px !important;
  }

  .tutorial-buttons {
    gap: 4px !important;
    order: 1 !important;
    justify-content: center !important;
  }

  .tutorial-btn {
    padding: 4px 8px !important;
    font-size: 9px !important;
    flex: 1 !important;
    min-width: 45px !important;
    border-radius: 4px !important;
  }

  /* Flechas más pequeñas en móviles */
  .tutorial-arrow.top,
  .tutorial-arrow.bottom {
    border-left-width: 6px !important;
    border-right-width: 6px !important;
    border-bottom-width: 6px !important;
    border-top-width: 6px !important;
  }

  .tutorial-arrow.left,
  .tutorial-arrow.right {
    border-top-width: 6px !important;
    border-bottom-width: 6px !important;
    border-right-width: 6px !important;
    border-left-width: 6px !important;
  }

  .tutorial-arrow.top {
    top: -6px !important;
  }

  .tutorial-arrow.bottom {
    bottom: -6px !important;
  }

  .tutorial-arrow.left {
    left: -6px !important;
  }

  .tutorial-arrow.right {
    right: -6px !important;
  }
}

/* Móviles medianos (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .header-left {
    gap: 20px;
  }

  .logo-text {
    display: block;
  }

  .divider {
    display: block;
  }

  .nav-bar {
    gap: 12px;
    justify-content: center;
  }

  .main-container {
    flex-direction: column;
    height: calc(100vh - 140px);
  }

  /* FORMULARIO MANUAL - ORDEN 1 - REVERTIR A ORIGINAL */
  .manual-form-container {
    order: 1;
    width: 100%;
    max-height: 30vh; /* REVERTIDO de 40vh a 30vh original */
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  /* SIDEBAR CON UBICACIONES - ORDEN 2 - REVERTIR A ORIGINAL */
  .sidebar {
    order: 2;
    padding: 16px 12px;
    max-height: 45vh; /* REVERTIDO de 55vh a 45vh original */
    min-height: 250px; /* REVERTIDO de 300px a 250px original */
  }

  /* LISTA DE UBICACIONES - SOLO ESTA AUMENTAR */
  .locations-list {
    margin-top: 16px;
    max-height: 500px; /* AUMENTADO de 300px a 450px */
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-item {
    padding: 14px;
    margin-bottom: 10px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* MAPA - ORDEN 3 - REVERTIR A ORIGINAL */
  .map-container {
    order: 3;
    min-height: 25vh; /* REVERTIDO de 20vh a 25vh */
    padding: 12px;
  }

  .search-container {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .map-controls {
    top: 65px;
    right: 12px;
  }

  .register-btn {
    position: fixed; /* Cambiado de absolute a fixed */
    bottom: 85px; /* Cambiado de 65px a 85px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
  }

  .navigation-controls {
    position: fixed; /* Cambiado de absolute a fixed */
    bottom: 20px; /* Cambiado de 15px a 20px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
  }

  /* TUTORIALES OPTIMIZADOS PARA MÓVILES MEDIANOS */
  /* TUTORIALES MÁS PEQUEÑOS PARA MÓVILES MEDIANOS */
  .tutorial-tooltip {
    max-width: 240px !important;
    padding: 10px !important;
    margin: 6px !important;
    border-radius: 6px !important;
  }

  .tutorial-tooltip h3 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
  }

  .tutorial-tooltip p {
    font-size: 11px !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
  }

  .tutorial-btn {
    padding: 5px 10px !important;
    font-size: 10px !important;
    border-radius: 4px !important;
  }

  .tutorial-progress {
    font-size: 9px !important;
  }

  .tutorial-controls {
    gap: 6px !important;
  }

  .tutorial-buttons {
    gap: 4px !important;
  }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-container {
    flex-direction: row;
    height: calc(100vh - 140px);
  }

  /* FORMULARIO MANUAL A LA IZQUIERDA */
  .manual-form-container {
    order: 1;
    width: 300px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
  }

  /* SIDEBAR EN EL MEDIO */
  .sidebar {
    order: 2;
    width: 280px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
    padding: 24px 20px;
  }

  /* LISTA DE UBICACIONES */
  .locations-list {
    margin-top: 24px;
    max-height: 400px; /* MÁS ALTURA EN TABLETS */
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-item {
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* MAPA A LA DERECHA */
  .map-container {
    order: 3;
    flex: 1;
    padding: 16px;
  }

  .search-container {
    top: 16px;
    left: 16px;
    right: 16px;
  }

  .map-controls {
    top: 70px;
    right: 16px;
  }

  .register-btn {
    bottom: 80px; /* Cambiado de 70px a 80px */
  }

  .navigation-controls {
    bottom: 25px; /* Cambiado de 5px a 25px */
  }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
  .main-container {
    flex-direction: row;
    height: calc(100vh - 160px);
  }

  /* FORMULARIO MANUAL A LA IZQUIERDA */
  .manual-form-container {
    order: 1;
    width: 320px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
  }

  /* SIDEBAR EN EL MEDIO */
  .sidebar {
    order: 2;
    width: 320px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
    padding: 32px 24px;
  }

  .sidebar h2 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .sidebar p {
    font-size: 16px;
    margin-bottom: 32px;
  }

  /* LISTA DE UBICACIONES */
  .locations-list {
    margin-top: 24px;
    max-height: 400px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-item {
    padding: 16px;
    margin-bottom: 12px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-title {
    font-size: 16px;
  }

  .location-address-main {
    font-size: 14px;
  }

  .location-address-details {
    font-size: 12px;
  }

  .location-coords {
    font-size: 11px;
  }

  .location-type {
    font-size: 12px;
  }

  .location-time {
    font-size: 11px;
  }

  .delete-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* MAPA A LA DERECHA */
  .map-container {
    order: 3;
    flex: 1;
    padding: 20px;
  }

  .manual-form-header {
    padding: 24px;
  }

  .manual-form-header h3 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .manual-form-header p {
    font-size: 14px;
  }

  .manual-form {
    padding: 24px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
  }

  .form-select,
  .form-input {
    padding: 12px 16px;
  }

  .register-manual-btn {
    margin-top: 24px;
    font-size: 15px;
  }

  .nav-bar {
    gap: 60px;
    padding: 12px 20px;
  }

  .nav-icon {
    padding: 12px;
    gap: 6px;
  }

  .nav-icon svg {
    width: 28px;
    height: 28px;
  }

  .search-container {
    top: 20px;
    left: 20px;
    right: 20px;
  }

  .search-input {
    padding: 16px 20px;
    font-size: 15px;
  }

  .search-btn {
    padding: 16px 20px;
    min-width: 60px;
  }

  .map-controls {
    top: 80px;
    right: 20px;
  }

  .zoom-btn,
  .view-toggle-btn {
    width: 48px;
    height: 48px;
  }

  .view-toggle-btn svg {
    width: 22px;
    height: 22px;
  }

  .register-btn {
    bottom: 80px; /* Cambiado de 120px a 80px */
    padding: 16px 32px;
    font-size: 15px;
  }

  .navigation-controls {
    bottom: 8px; /* Cambiado de 15px a 8px */
    gap: 16px;
  }

  .nav-btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .tutorial-tooltip {
    max-width: 320px;
    padding: 20px;
  }

  .tutorial-tooltip h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .tutorial-tooltip p {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .tutorial-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .notification {
    top: 20px;
    right: 20px;
    left: auto;
    max-width: 350px;
    font-size: 14px;
    padding: 16px 20px;
  }
}



/* Orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .main-container {
    flex-direction: row;
    height: calc(100vh - 100px);
  }

  .manual-form-container {
    order: 1;
    width: 280px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
  }

  .manual-form-header {
    padding: 8px;
  }

  .manual-form {
    padding: 8px;
  }

  .sidebar {
    order: 2;
    width: 260px;
    max-height: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
    padding: 12px;
  }

  .sidebar h2 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .sidebar p {
    font-size: 12px;
    margin-bottom: 12px;
  }

  /* LISTA DE UBICACIONES EN LANDSCAPE */
  .locations-list {
    margin-top: 12px;
    max-height: 200px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .location-item {
    padding: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    /* FORZAR VISIBILIDAD */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .map-container {
    order: 3;
    flex: 1;
    padding: 10px;
  }

  .search-container {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .map-controls {
    top: 55px;
    right: 10px;
  }

  .register-btn {
    position: fixed;
    bottom: 70px; /* Cambiado de 50px a 70px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
  }

  .navigation-controls {
    position: fixed;
    bottom: 15px; /* Cambiado de 10px a 15px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
  }
}

/* Pantallas de alta resolución */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .loader-icon {
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
  }

  .search-box {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  /* Agregar estilos de modo oscuro aquí si es necesario */
}

/* Reducir animaciones */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Estilos para impresión */
@media print {
  .header,
  .nav-bar,
  .map-controls,
  .register-btn,
  .navigation-controls,
  .tutorial-overlay,
  .notification {
    display: none !important;
  }

  .main-container {
    height: auto;
    flex-direction: column;
  }

  .manual-form-container,
  .sidebar {
    width: 100%;
    max-height: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    order: initial;
  }

  .map-container {
    height: 400px;
    border: 1px solid #ccc;
    order: initial;
  }
}
/* Estilos adicionales para la sección de coordenadas */

.coordinates-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.coordinates-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.coordinates-title svg {
  color: #10b981;
}

.coordinates-description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.coordinates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .coordinates-row {
    grid-template-columns: 1fr;
  }
}

.coordinate-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.coord-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.coord-btn:hover {
  background: #f3f4f6;
  border-color: #10b981;
  color: #10b981;
}

.coord-btn svg {
  width: 16px;
  height: 16px;
}

.coordinate-examples {
  background: #ffffff;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.coordinate-examples h5 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.example-coords {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-btn {
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: #6b7280;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.example-btn:hover {
  background: #f9fafb;
  border-color: #10b981;
  color: #10b981;
}

.form-help {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Marcador de vista previa */
.preview-marker {
  background: #f59e0b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preview-marker::after {
  content: "👁️";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
}
