* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.hidden { display: none !important; }

/* INICIO Y AUTENTICACIÓN */
.home-body { background: linear-gradient(180deg, #6a040f 0%, #03071e 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; color: white; }
.top-menu-btn { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; font-size: 1.5rem; padding: 8px 12px; border-radius: 8px; cursor: pointer; backdrop-filter: blur(5px); z-index: 50; }
.home-container { text-align: center; padding: 20px; width: 100%; max-width: 400px; }
.action-buttons { display: flex; flex-direction: column; gap: 15px; }

/* Botones */
.btn-primary { background: #9b1c31; color: white; border: none; padding: 14px 24px; border-radius: 12px; font-size: 1rem; font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px rgba(155,28,49,0.4); transition: transform 0.2s; width: 100%; }
.btn-primary:active { transform: scale(0.95); }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 14px 24px; border-radius: 12px; font-size: 1rem; cursor: pointer; width: 100%; }
.btn-text { background: transparent; border: none; color: #9b1c31; font-weight: bold; cursor: pointer; font-size: 0.9rem; }
.forgot-wrap { text-align: right; margin: -4px 0 14px; }
.forgot-wrap .btn-text { font-size: 0.8rem; font-weight: 600; }

/* Modales */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); }
.modal-content { background: white; padding: 25px; border-radius: 20px; width: 90%; max-width: 400px; position: relative; color: #333; max-height: 90vh; overflow-y: auto;}
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: #666; }

/* Formularios */
.auth-tabs { display: flex; justify-content: space-around; margin-bottom: 20px; border-bottom: 2px solid #eee; }
.auth-tab { background: none; border: none; padding: 10px; font-size: 1rem; color: #888; cursor: pointer; font-weight: bold; }
.auth-tab.active { color: #9b1c31; border-bottom: 2px solid #9b1c31; }

.form-group { text-align: left; margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.8rem; color: #555; margin-bottom: 5px; font-weight: 600; margin-left: 2px;}

.auth-form input, .auth-select { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #ddd; background: #f9f9f9; font-size: 1rem; color:#333; }
.password-container { position: relative; }
.toggle-pass { position: absolute; right: 15px; top: 12px; cursor: pointer; font-size: 1.2rem; }
.phone-input-group { display: flex; align-items: center; background: #f9f9f9; border-radius: 10px; border: 1px solid #ddd; padding-left: 15px; }
.phone-input-group input { border: none; margin-bottom: 0; background: transparent; padding: 12px 10px; width: 100%; }
.phone-prefix { font-weight: bold; color: #555; }

/* Botón Google Oficial */
.divider { text-align: center; margin: 15px 0; color: #aaa; font-size: 0.85rem; }
.btn-google { display: flex; align-items: center; justify-content: center; width: 100%; padding: 2px; background: #4285F4; border: none; border-radius: 12px; font-size: 1rem; font-weight: bold; color: white; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.google-icon-wrapper { background: white; padding: 8px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 10px; }
.google-icon-wrapper img { width: 18px; margin: 0; }

/* MAPA Y BOTTOM SHEET */
.map-body { position: fixed; top: 0; left: 0; width: 100%; height: 100dvh; overflow: hidden; background: #0b0b0b; margin: 0; padding: 0; }
#map { width: 100% !important; height: 100% !important; position: absolute !important; top: 0; left: 0; z-index: 1; }

.map-floating-controls { position: absolute; top: 15px; right: 15px; z-index: 10; display: flex; flex-direction: column; gap: 10px; }
.map-float-btn { background: rgba(25, 25, 25, 0.85); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.location-target-btn svg { width: 22px; height: 22px; stroke: #9b1c31; }

/* Perfil Modal */
.profile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 5px;}
.profile-item { text-align: left; margin-bottom: 15px; border-bottom: 1px solid #f5f5f5; padding-bottom: 5px;}
.profile-item label { display: block; font-size: 0.75rem; color: #888; font-weight: bold; margin-bottom: 2px;}
.profile-item p { font-size: 1rem; color: #333; font-weight: 500;}

.bottom-sheet { position: fixed; bottom: 0; left: 0; width: 100%; height: 35vh; background: rgba(20, 20, 20, 0.95); backdrop-filter: blur(12px); border-top-left-radius: 20px; border-top-right-radius: 20px; box-shadow: 0 -5px 25px rgba(0,0,0,0.5); z-index: 100; transform: translateY(calc(100% - 45px)); transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1); display: flex; flex-direction: column; }
.bottom-sheet.active { transform: translateY(0); }
.sheet-header { height: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.sheet-handle { width: 35px; height: 4px; background: rgba(255, 255, 255, 0.4); border-radius: 2px; margin-bottom: 4px; }
.sheet-title { color: #fff; font-size: 0.85rem; font-weight: 600; margin: 0; letter-spacing: 0.5px; }

.carousel-container { display: flex; overflow-x: auto; gap: 15px; padding: 10px 20px 20px 20px; scroll-behavior: smooth; scroll-snap-type: x mandatory; flex-grow: 1; }
.carousel-container::-webkit-scrollbar { display: none; }
.truck-card { scroll-snap-align: center; flex: 0 0 85%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; display: flex; align-items: center; padding: 10px; position: relative; cursor: pointer; }
.truck-card img { width: 75px; height: 75px; border-radius: 8px; object-fit: cover; margin-right: 12px; }
.truck-card-info { flex: 1; overflow: hidden; }
.truck-card-info h4 { margin: 0 0 3px 0; color: #fff; font-size: 1rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.truck-card-info p { margin: 0 0 4px 0; color: #aaa; font-size: 0.75rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.truck-status-text { font-size: 0.75rem; font-weight: bold; margin-bottom: 2px; display: block;}
.truck-schedule { font-size: 0.7rem; color: #ccc; }
.card-number { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6); color: white; padding: 2px 6px; border-radius: 6px; font-size: 0.75rem; font-weight: bold; }
.phone-input-group .phone-prefix-input { width: 58px; flex: 0 0 58px; font-weight: bold; color: #555; padding-right: 0; padding-left: 0; text-align: left; }

/* Ventanita del mapa: tamaño fijo y sin barras de desplazamiento.
   (La foto cargaba después de que Google medía la ventana y aparecían franjas blancas de scroll.) */
.gm-style .gm-style-iw-d { overflow: hidden !important; max-height: none !important; }
.gm-style .gm-style-iw-c { max-height: none !important; padding-bottom: 12px !important; }
.gm-style .gm-style-iw-d::-webkit-scrollbar { display: none; }
