* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: serif; background: #f5f5f5; color: #333; line-height: 1.6; overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }
body.dark-mode { background: #121212; color: #e0e0e0; }
.loading-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #007bff, #0056b3); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; color: white; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-top: 4px solid white; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.login-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #000000, #434343); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; color: white; padding: 20px; }
.login-container { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 20px; padding: 30px; width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo h1 { font-size: 1.5rem; margin-bottom: 10px; }
.login-logo img { width: 140px; height: 160px; border-radius: 15px; object-fit: cover; margin-bottom: 15px; border: 2px solid rgba(255, 255, 255, 0.3); }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; margin-bottom: 8px; font-weight: 500; }
.login-form input { width: 100%; padding: 15px; border: none; border-radius: 10px; background: rgba(255, 255, 255, 0.2); color: white; font-size: 1rem; }
.login-btn { width: 100%; padding: 15px; border: none; border-radius: 10px; background: #007bff; color: white; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 10px; }
.login-options { display: flex; justify-content: space-between; margin-top: 15px; font-size: 0.9rem; }
.login-option { background: none; border: none; color: rgba(255, 255, 255, 0.8); cursor: pointer; }
.auth-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #000000, #434343); display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; padding: 20px; }
.auth-container { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 20px; padding: 30px; width: 100%; max-width: 400px; }
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-form input { width: 100%; padding: 15px; border: none; border-radius: 10px; background: rgba(255, 255, 255, 0.2); color: white; font-size: 1rem; }
.auth-btn { width: 100%; padding: 15px; border: none; border-radius: 10px; background: #007bff; color: white; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 10px; }
.back-to-login { background: none; border: none; color: rgba(255, 255, 255, 0.8); text-decoration: underline; cursor: pointer; margin-top: 15px; width: 100%; }
.auth-message { padding: 10px 15px; border-radius: 10px; margin-bottom: 15px; text-align: center; display: none; }
.auth-message.success { background: rgba(40, 167, 69, 0.2); border: 1px solid rgba(40, 167, 69, 0.5); }
.auth-message.error { background: rgba(220, 53, 69, 0.2); border: 1px solid rgba(220, 53, 69, 0.5); }
.sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: white; box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 1001; transition: left 0.3s ease; overflow-y: auto; padding-top: 60px; }
body.dark-mode .sidebar { background: #1e1e1e; }
.sidebar.active { left: 0; }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; display: none; }
.sidebar-overlay.active { display: block; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 50px; height: 50px; border-radius: 50%; background: #007bff; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.user-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
.user-info p { font-size: 0.8rem; color: #666; }
.admin-badge { background: #dc3545; color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 12px; margin-left: 8px; }
.sidebar-menu { padding: 20px 0; }
.menu-item { display: flex; align-items: center; padding: 15px 20px; border: none; background: none; width: 100%; text-align: left; font-size: 1rem; cursor: pointer; gap: 12px; }
.menu-item i { width: 20px; text-align: center; font-size: 1.05rem; }
.menu-divider { height: 1px; background: #e0e0e0; margin: 12px 20px; }
.toggle-container { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; }
.toggle-label { display: flex; align-items: center; gap: 10px; }
.whatsapp-toggle { position: relative; display: inline-block; width: 54px; height: 28px; }
.whatsapp-toggle input { opacity: 0; width: 0; height: 0; }
.whatsapp-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.whatsapp-slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.whatsapp-toggle input:checked + .whatsapp-slider { background-color: #0084ff; }
.whatsapp-toggle input:checked + .whatsapp-slider:before { transform: translateX(26px); }
.app-info { padding: 20px; font-size: 0.8rem; color: #666; text-align: center; border-top: 1px solid #eee; margin-top: 20px; }
.app-container { max-width: 100%; min-height: 100vh; padding-bottom: 80px; }
.app-header { background: white; padding: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; }
body.dark-mode .app-header { background: #1e1e1e; }
.header-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.header-content h1 { font-size: 1rem; }
.menu-toggle { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 5px; margin-right: 10px; color: inherit; }
.status-indicator { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #666; }
.status-dot { width: 8px; height: 8px; background: #4CAF50; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: white; display: flex; justify-content: space-around; padding: 10px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; overflow-x: auto; }
body.dark-mode .bottom-nav { background: #1e1e1e; }
.nav-item { display: flex; flex-direction: column; align-items: center; background: none; border: none; padding: 8px 12px; border-radius: 10px; transition: all 0.3s; opacity: 0.6; color: inherit; cursor: pointer; flex-shrink: 0; }
.nav-item.active { opacity: 1; background: #007bff; color: white; }
.nav-icon { font-size: 1.2rem; margin-bottom: 4px; }
.nav-text { font-size: 0.7rem; font-weight: 500; }
.main-content { padding: 15px; }
.card { background: white; border-radius: 15px; padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
body.dark-mode .card { background: #1e1e1e; }
.card h2 { margin-bottom: 20px; font-size: 1.3rem; }
.mobile-form .form-group { margin-bottom: 20px; }
.mobile-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.mobile-form input, .mobile-form select { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 1rem; background: white; }
body.dark-mode .mobile-form input, body.dark-mode .mobile-form select { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.btn { width: 100%; padding: 15px; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; }
.btn i { margin-right: 6px; }
.btn-primary { background: #007bff; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-info { background: #17a2b8; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-warning { background: #ffc107; color: #212529; }
.servicios-list { display: flex; flex-direction: column; gap: 15px; }
.servicio-item { background: #f8f9fa; padding: 15px; border-radius: 10px; border-left: 4px solid #007bff; cursor: pointer; transition: all 0.2s; }
.servicio-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
body.dark-mode .servicio-item { background: #2a2a2a; }
.servicio-item.asignado { border-left-color: #ffc107; background: #fff9e6; }
body.dark-mode .servicio-item.asignado { background: #3a2e15; color: #fff9e6; }
.servicio-item.mio { border-left-color: #28a745 !important; background: #e9f7ee; box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2); }
body.dark-mode .servicio-item.mio { background: #15301d; }
.servicio-info { display: grid; gap: 8px; font-size: 0.9rem; }
.servicio-info div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; margin-left: 6px; }
.badge.disponible { background: #28a745; color: white; }
.badge.asignado { background: #ffc107; color: black; }
.badge.completado { background: #28a745; color: white; }
.badge.cancelado { background: #dc3545; color: white; }
.badge.mio { background: #28a745; color: white; }
.badge.republicado { background: #fd7e14; color: white; }
.badge.dificil { background: #b00020; color: white; animation: pulse 2s infinite; }
.actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1; min-width: 120px; padding: 10px; font-size: 0.85rem; }
.filters { margin: 20px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn { padding: 8px 16px; border: none; border-radius: 5px; cursor: pointer; background: #e9ecef; font-size: 0.8rem; }
.filter-btn.active { background: #007bff; color: white; }
.submini-toggle { display: flex; gap: 8px; margin: 10px 0 15px; padding: 6px; background: #f0f0f0; border-radius: 10px; align-items: center; }
body.dark-mode .submini-toggle { background: #2a2a2a; }
.submini-toggle button { flex: 1; padding: 8px; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: inherit; }
.submini-toggle button.active { background: #007bff; color: white; }
.map-container { height: 380px; background: #e9ecef; border-radius: 10px; margin-bottom: 15px; overflow: hidden; position: relative; }
#map { width: 100%; height: 100%; }
.map-legend { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.95); padding: 8px 12px; border-radius: 8px; font-size: 0.75rem; z-index: 5; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
body.dark-mode .map-legend { background: rgba(30,30,30,0.95); color: #e0e0e0; }
.map-legend div { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid white; }
.map-controls { display: flex; gap: 10px; margin-top: 15px; }
.map-controls .btn { flex: 1; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.creditos-panel { background: linear-gradient(135deg, #007bff, #0056b3); border-radius: 15px; padding: 20px; color: white; text-align: center; margin-bottom: 20px; }
.creditos-panel .saldo { font-size: 2.5rem; font-weight: bold; margin: 10px 0; }
.paquetes-creditos { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.paquete-credito { background: white; border: 2px solid #e0e0e0; border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; }
body.dark-mode .paquete-credito { background: #2a2a2a; border-color: #444; }
.paquete-credito.seleccionado { border-color: #007bff; background: #e7f3ff; }
.paquete-creditos { font-size: 2em; font-weight: bold; color: #007bff; }
.btn-recargar { background: #28a745; color: white; border: none; border-radius: 10px; padding: 12px 20px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; margin-top: 15px; }
.btn-recargar i { margin-right: 6px; }
.info-creditos { background: #e7f3ff; border-radius: 10px; padding: 15px; margin: 15px 0; }
body.dark-mode .info-creditos { background: #1a2a3a; }
.alerta-creditos { background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 10px; padding: 15px; margin: 15px 0; text-align: center; display: none; }
.servicio-activo-info { background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 10px; padding: 15px; margin-bottom: 15px; display: none; }
.servicio-activo-info.active { display: block; }
.servicio-activo-alert { background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 10px; padding: 15px; margin-bottom: 15px; display: none; }
.servicio-activo-alert.active { display: block; }
.estado-servicio { background: #e7f3ff; border-radius: 10px; padding: 15px; margin-bottom: 15px; }
.mensaje { padding: 15px; text-align: center; margin: 15px 0; border-radius: 10px; display: none; }
.mensaje.exito { background: #d4edda; color: #155724; }
.mensaje.error { background: #f8d7da; color: #721c24; }
.loading { display: none; text-align: center; margin: 15px 0; }
.spinner { width: 30px; height: 30px; border: 3px solid rgba(0, 123, 255, 0.3); border-top: 3px solid #007bff; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; }
.pagina-creditos { display: block; }
.success-icon, .error-icon, .pending-icon { font-size: 60px; margin-bottom: 20px; }
.success-icon { color: #28a745; }
.error-icon { color: #dc3545; }
.pending-icon { color: #ffc107; }
.btn-volver { background: linear-gradient(135deg, #3498db, #2980b9); color: white; border: none; padding: 15px 30px; border-radius: 25px; font-size: 1em; font-weight: bold; cursor: pointer; margin-top: 20px; width: 100%; }
.transaccion-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; }
.transaccion-monto.positivo { color: #28a745; }
.transaccion-monto.negativo { color: #dc3545; }
.admin-tarifas-card { background: linear-gradient(135deg, #1a1a2e, #16213e); color: white; }
body.dark-mode .admin-tarifas-card { background: linear-gradient(135deg, #0a0a15, #0e1628); }
.tarifas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.tarifa-admin-card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 15px; padding: 15px; border: 1px solid rgba(255, 255, 255, 0.2); }
.tarifa-admin-card h3 { text-align: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #00d4ff; }
.tarifa-admin-card .form-group { margin-bottom: 12px; }
.tarifa-admin-card label { display: block; margin-bottom: 5px; font-size: 0.85rem; color: #ccc; }
.tarifa-admin-card input { width: 100%; padding: 10px; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.15); color: white; font-size: 1rem; }
.recargos-container { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 15px; padding: 20px; margin-top: 20px; }
.recargo-toggle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.admin-switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.admin-switch input { opacity: 0; width: 0; height: 0; }
.admin-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: 0.4s; border-radius: 24px; }
.admin-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: 0.4s; border-radius: 50%; }
input:checked + .admin-slider { background-color: #00d4ff; }
input:checked + .admin-slider:before { transform: translateX(26px); }
.recargo-buttons { display: flex; gap: 10px; margin: 15px 0; flex-wrap: wrap; }
.recargo-btn-admin { flex: 1; padding: 10px; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.15); color: white; cursor: pointer; transition: all 0.3s; }
.recargo-btn-admin.active { background: #00d4ff; color: #1a1a2e; font-weight: bold; }
.btn-guardar-tarifas { width: 100%; padding: 15px; margin-top: 20px; border: none; border-radius: 10px; background: linear-gradient(135deg, #00d4ff, #0099cc); color: white; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: all 0.3s; }
.btn-guardar-tarifas i { margin-right: 8px; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } .paquetes-creditos { grid-template-columns: 1fr; } .tarifas-grid { grid-template-columns: 1fr; } }
.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { width: 100%; padding: 15px; padding-right: 50px; border: none; border-radius: 10px; background: rgba(255, 255, 255, 0.2); color: white; font-size: 1rem; }
.toggle-password-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: rgba(255, 255, 255, 0.8); font-size: 1.3rem; cursor: pointer; padding: 8px; }
.servicio-activo-info, .servicio-activo-alert, body.dark-mode .servicio-activo-info, body.dark-mode .servicio-activo-alert { background: #fff3cd !important; color: #1a1a1a !important; border: 1px solid #ffeaa7 !important; }
.servicio-activo-info *, .servicio-activo-alert * { color: #1a1a1a !important; }
.estado-servicio, body.dark-mode .estado-servicio { background: #e7f3ff !important; color: #1a1a1a !important; }
.estado-servicio * { color: #1a1a1a !important; }
body.dark-mode .mensaje.exito { background: #d4edda !important; color: #155724 !important; }
body.dark-mode .mensaje.error { background: #f8d7da !important; color: #721c24 !important; }
body.dark-mode .alerta-creditos { background: #fff3cd !important; color: #1a1a1a !important; }
body.dark-mode .sidebar { background: #1e1e1e !important; color: #e0e0e0 !important; }
body.dark-mode .sidebar .menu-item { color: #ffffff !important; background: transparent; }
body.dark-mode .sidebar .menu-item:hover { background: rgba(255, 255, 255, 0.08); }
body.dark-mode .sidebar .toggle-label, body.dark-mode .sidebar .toggle-container { color: #ffffff !important; }
body.dark-mode .sidebar .user-info h3 { color: #ffffff !important; }
body.dark-mode .sidebar .user-info p { color: #b0b0b0 !important; }
body.dark-mode .sidebar-header { border-bottom: 1px solid #333 !important; }
body.dark-mode .menu-divider { background: #333 !important; }
body.dark-mode .app-info { color: #888 !important; border-top: 1px solid #333 !important; }
.usuarios-header-info { background: linear-gradient(135deg, #6f42c1, #4b2a8c); color: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; text-align: center; }
.usuarios-header-info h3 { margin-bottom: 8px; }
.usuarios-header-info .contador-grande { font-size: 2rem; font-weight: bold; margin: 10px 0; }
.usuarios-busqueda { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 1rem; margin-bottom: 15px; }
body.dark-mode .usuarios-busqueda { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
.usuarios-list-container { max-height: 500px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px; background: #fafafa; }
body.dark-mode .usuarios-list-container { background: #2a2a2a; border-color: #444; }
.usuario-item { background: white; border-radius: 10px; padding: 15px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-left: 4px solid #007bff; }
body.dark-mode .usuario-item { background: #1e1e1e; color: #e0e0e0; }
.usuario-item.es-admin { border-left-color: #dc3545; background: #fff5f5; }
body.dark-mode .usuario-item.es-admin { background: #2a1a1a; }
.usuario-item.suspendido { background: #fff3cd; border-left-color: #b00020; }
body.dark-mode .usuario-item.suspendido { background: #3a2e15; }
.usuario-info-bloque { flex: 1; }
.usuario-nombre { font-weight: bold; font-size: 1rem; margin-bottom: 4px; }
.usuario-rol { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; }
.usuario-rol.conductor { background: #007bff; color: white; }
.usuario-rol.admin { background: #dc3545; color: white; }
.usuario-tasa { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; }
.usuario-tasa.verde { background: #d4edda; color: #155724; }
.usuario-tasa.amarillo { background: #fff3cd; color: #856404; }
.usuario-tasa.rojo { background: #f8d7da; color: #721c24; }
.usuario-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-rol { padding: 8px 14px; border: none; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-rol i { margin-right: 5px; }
.btn-rol.promover { background: #28a745; color: white; }
.btn-rol.degradar { background: #ffc107; color: #212529; }
.btn-rol.principal { background: #6c757d; color: white; cursor: not-allowed; }
.btn-rol.quitar-suspension { background: #17a2b8; color: white; }
.alerta-limite { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; border-radius: 10px; padding: 12px 15px; margin-bottom: 15px; font-size: 0.9rem; text-align: center; }
.notificacion i { margin-right: 8px; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 5000; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-box { background: white; border-radius: 15px; padding: 25px; width: 100%; max-width: 450px; max-height: 90vh; overflow-y: auto; }
body.dark-mode .modal-box { background: #1e1e1e; color: #e0e0e0; }
.modal-box h3 { margin-bottom: 20px; }
.modal-box .form-group { margin-bottom: 15px; }
.modal-box label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.modal-box select, .modal-box textarea { width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 1rem; background: white; color: #333; }
body.dark-mode .modal-box select, body.dark-mode .modal-box textarea { background: #2a2a2a; border-color: #444; color: #e0e0e0; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; padding: 12px; }
.timeline { list-style: none; padding-left: 0; margin: 15px 0; border-left: 3px solid #007bff; }
.timeline li { position: relative; padding: 10px 15px 15px 25px; }
.timeline li:before { content: ''; position: absolute; left: -9px; top: 15px; width: 15px; height: 15px; border-radius: 50%; background: #007bff; }
.timeline li.cancelado:before { background: #dc3545; }
.timeline li.completado:before { background: #28a745; }
.timeline li.reasignado:before { background: #fd7e14; }
.timeline-fecha { font-size: 0.8rem; color: #888; }
.timeline-titulo { font-weight: bold; margin: 4px 0; }
.timeline-motivo { font-size: 0.9rem; font-style: italic; color: #666; }

/* Mejoras brújula y controles */
.gm-style .gm-style-iw-c { border-radius: 12px !important; }
.gm-svpc { background-color: #007bff !important; width: 36px !important; height: 36px !important; }
.gmnoprint .gm-control-active { background-color: white !important; border-radius: 8px !important; box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important; }
body.dark-mode .gmnoprint .gm-control-active { background-color: #2a2a2a !important; }

/* === BRÚJULA TIPO GOOGLE MAPS NATIVO (dentro del mapa) === */
.compass-control {
    width: 50px; height: 50px; background: white; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); cursor: pointer; margin: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s, transform 0.3s; user-select: none;
    -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.compass-control:active { transform: scale(0.92); }
body.dark-mode .compass-control { background: #2a2a2a; }
.compass-needle { width: 30px; height: 30px; position: relative; transition: transform 0.15s ease-out; }
.compass-needle::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 14px solid #e74c3c; }
.compass-needle::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 14px solid #555; }
body.dark-mode .compass-needle::after { border-top-color: #aaa; }
.compass-label { position: absolute; top: -2px; font-size: 9px; font-weight: bold; color: #e74c3c; left: 50%; transform: translateX(-50%); }

/* === BOTÓN MI UBICACIÓN DENTRO DEL MAPA === */
.location-control {
    width: 50px; height: 50px; background: white; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); cursor: pointer; margin: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 22px; color: #555;
    transition: transform 0.15s, color 0.15s, background 0.15s; user-select: none;
    -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.location-control:active { transform: scale(0.92); color: #007bff; }
.location-control:hover { color: #007bff; }
body.dark-mode .location-control { background: #2a2a2a; color: #ccc; }
body.dark-mode .location-control:hover { color: #4dabf7; }
.voice-control { color: #28a745; }
.voice-control:hover { color: #28a745; }
.voice-control.voice-off { color: #dc3545; background: #fff0f0; }
body.dark-mode .voice-control { color: #4ade80; }
body.dark-mode .voice-control.voice-off { color: #f87171; background: #3a1a1a; }

/* ══════════════════════════════════════════════════════
   CHAT FLOTANTE CONDUCTOR↔CLIENTE (estilo inDrive)
   ══════════════════════════════════════════════════════ */
/* FAB — botón flotante sobre el mapa */
#chatFab {
    position: absolute; bottom: 14px; left: 14px;  /* ← Cambiado de right a left */
    z-index: 20;
    width: 52px; height: 52px; border-radius: 50%;
    background: #1a1a2e; border: 2.5px solid #00d4ff; color: #00d4ff;
    font-size: 1.3rem; display: none; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 20px rgba(0,212,255,.35);
    transition: transform .18s, box-shadow .18s;
    -webkit-tap-highlight-color: transparent; user-select: none;
}




#chatFab:active { transform: scale(.9); }
#chatFab.visible { display: flex; }
/* Badge de no leídos */
#chatFabBadge {
    position: absolute; top: -4px; right: -4px;
    background: #ff3b30; color: white; border-radius: 50%;
    min-width: 20px; height: 20px; font-size: .68rem; font-weight: 700;
    display: none; align-items: center; justify-content: center;
    padding: 0 4px; border: 2px solid white;
    animation: badgePop .3s cubic-bezier(.34,1.56,.64,1);
}
#chatFabBadge.show { display: flex; }
@keyframes badgePop { from{transform:scale(0)} to{transform:scale(1)} }
/* Toast de nuevo mensaje */
#chatToast {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
    background: #1a1a2e; color: #00d4ff; border: 1px solid #00d4ff;
    padding: 10px 18px; border-radius: 24px; font-size: .82rem; font-weight: 600;
    z-index: 9999; display: none; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(0,212,255,.25); cursor: pointer;
    max-width: 90vw; white-space: nowrap;
    animation: toastIn .25s ease-out;
}
@keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(-10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
#chatToast.show { display: flex; }
/* Backdrop */
#chatBackdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000;
    display: none; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
#chatBackdrop.open { display: block; }
/* Drawer principal */
#chatDrawer {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 62vh; max-height: 540px;
    background: #f5f5f5; border-radius: 22px 22px 0 0;
    z-index: 2001; display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow: hidden; box-shadow: 0 -8px 40px rgba(0,0,0,.22);
}
body.dark-mode #chatDrawer { background: #181828; }
#chatDrawer.open { transform: translateY(0); }
.chat-pill { width:40px; height:4px; background:rgba(0,0,0,.15); border-radius:2px; margin:10px auto 0; flex-shrink:0; }
body.dark-mode .chat-pill { background:rgba(255,255,255,.15); }
/* Header del drawer */
.chat-dh {
    display:flex; align-items:center; gap:12px;
    padding:10px 16px 12px; border-bottom:1px solid rgba(0,0,0,.07);
    flex-shrink:0; background:white;
}
body.dark-mode .chat-dh { background:#1e1e32; border-bottom-color:rgba(255,255,255,.07); }
.chat-dh-av {
    width:40px; height:40px; border-radius:50%;
    background:linear-gradient(135deg,#1a1a2e,#00d4ff);
    display:flex; align-items:center; justify-content:center;
    color:white; font-size:1rem; flex-shrink:0;
}
.chat-dh-info { flex:1; min-width:0; }
.chat-dh-name { font-size:.95rem; font-weight:700; color:#1a1a1a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.dark-mode .chat-dh-name { color:#f0f0f0; }
.chat-dh-sub { font-size:.7rem; color:#888; display:flex; align-items:center; gap:5px; }
.chat-lock { display:inline-flex; align-items:center; gap:3px; background:#e8f5e9; color:#2e7d32; padding:1px 7px; border-radius:10px; font-size:.65rem; font-weight:600; }
body.dark-mode .chat-lock { background:#1a3a1d; color:#81c784; }
.chat-close { width:34px; height:34px; border-radius:50%; border:none; background:rgba(0,0,0,.06); color:#555; font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; -webkit-tap-highlight-color:transparent; }
body.dark-mode .chat-close { background:rgba(255,255,255,.08); color:#ccc; }
/* Lista de mensajes */
#chatMsgs {
    flex:1; overflow-y:auto; padding:12px 12px 8px;
    display:flex; flex-direction:column; gap:6px;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
}
.chat-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; color:#bbb; gap:10px; text-align:center; padding:20px; }
.chat-empty i { font-size:2.4rem; opacity:.5; }
.chat-empty p { font-size:.82rem; line-height:1.5; max-width:220px; }
/* Burbujas */
.chat-m { display:flex; flex-direction:column; max-width:78%; animation:msgIn .2s ease-out; }
@keyframes msgIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.chat-m.out { align-self:flex-end; align-items:flex-end; }
.chat-m.in  { align-self:flex-start; align-items:flex-start; }
.chat-m-lbl { font-size:.65rem; font-weight:700; margin-bottom:2px; color:#888; }
.chat-m.out .chat-m-lbl { color:#00a0c4; }
.chat-m.in  .chat-m-lbl { color:#f57c00; }
.chat-b { padding:9px 13px; border-radius:18px; font-size:.875rem; line-height:1.45; word-break:break-word; }
.chat-m.out .chat-b { background:#1a1a2e; color:#e8f4ff; border-bottom-right-radius:5px; }
.chat-m.in  .chat-b { background:white; color:#1a1a1a; border-bottom-left-radius:5px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
body.dark-mode .chat-m.in .chat-b { background:#252540; color:#e0e0e0; }
.chat-b.yavoy { background:linear-gradient(135deg,#e8f5e9,#c8e6c9); color:#1b5e20; font-weight:700; }
body.dark-mode .chat-b.yavoy { background:linear-gradient(135deg,#1a3a1d,#1e5020); color:#a5d6a7; }
.chat-m-time { font-size:.62rem; color:#bbb; margin-top:2px; padding:0 4px; }
/* Botones rápidos */
#chatQBtns { display:flex; gap:7px; padding:8px 12px; overflow-x:auto; flex-shrink:0; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
#chatQBtns::-webkit-scrollbar { display:none; }
.chat-qb { white-space:nowrap; border:1.5px solid #00d4ff; border-radius:20px; padding:6px 14px; font-size:.75rem; font-weight:600; cursor:pointer; flex-shrink:0; background:transparent; color:#00a0c4; transition:all .15s; -webkit-tap-highlight-color:transparent; }
body.dark-mode .chat-qb { color:#00d4ff; border-color:#00d4ff; }
.chat-qb:active { background:#00d4ff; color:#1a1a2e; transform:scale(.96); }
/* Input row */
.chat-ir { display:flex; align-items:flex-end; gap:8px; padding:10px 12px 14px; background:white; border-top:1px solid rgba(0,0,0,.07); flex-shrink:0; }
body.dark-mode .chat-ir { background:#1e1e32; border-top-color:rgba(255,255,255,.07); }
#chatInput { flex:1; min-height:40px; max-height:90px; padding:10px 14px; border:1.5px solid #e0e0e0; border-radius:22px; font-size:.9rem; resize:none; outline:none; background:#f9f9f9; color:#1a1a1a; font-family:inherit; line-height:1.4; transition:border-color .2s; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#chatInput:focus { border-color:#00d4ff; }
body.dark-mode #chatInput { background:#252540; border-color:#333; color:#e0e0e0; }
#chatSend { width:44px; height:44px; border-radius:50%; border:none; background:linear-gradient(135deg,#00d4ff,#0099cc); color:white; font-size:1.05rem; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 3px 12px rgba(0,212,255,.4); transition:transform .15s; -webkit-tap-highlight-color:transparent; }
#chatSend:active { transform:scale(.88); }
#chatSend:disabled { background:#ccc; box-shadow:none; cursor:not-allowed; }

/* ============================================================
   NUEVO: Panel de control de fase de viaje (A→B→C)
   ============================================================ */
#panelFaseViaje {
    display: none;
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.13);
}

/* Barra de progreso de fases */
.fase-progreso {
    background: #1a1a2e;
    padding: 12px 16px 8px;
    display: flex;
    align-items: center;
    gap: 0;
}
.fase-paso {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.fase-paso-circulo {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.85rem;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.4s;
    z-index: 2;
}
.fase-paso-circulo.activo {
    background: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.25);
}
.fase-paso-circulo.completado {
    background: #28a745;
    color: white;
    border-color: #28a745;
}
.fase-paso-label {
    font-size: 0.65rem; color: rgba(255,255,255,0.5);
    margin-top: 4px; text-align: center; white-space: nowrap;
}
.fase-paso-label.activo { color: #7ec8f7; font-weight: 700; }
.fase-paso-label.completado { color: #6ee7a2; }
.fase-linea {
    flex: 1; height: 3px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
    margin-bottom: 20px; /* empuja debajo de los círculos */
    border-radius: 2px;
    transition: background 0.4s;
}
.fase-linea.completada { background: #28a745; }

/* Cuerpo del panel */
.fase-cuerpo {
    background: white;
    padding: 16px;
}
body.dark-mode .fase-cuerpo { background: #1e1e1e; }

/* Indicador de fase actual */
.fase-indicador {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 14px;
    font-size: 0.9rem; font-weight: 600;
}
.fase-indicador.ab {
    background: #e7f3ff; color: #0056b3; border: 1px solid #b8d9f8;
}
.fase-indicador.bc {
    background: #e9f7ee; color: #155724; border: 1px solid #b2dfb9;
}
body.dark-mode .fase-indicador.ab { background: #1a2a3a; color: #7ec8f7; border-color: #2a4a6a; }
body.dark-mode .fase-indicador.bc { background: #152a1e; color: #6ee7a2; border-color: #2a4a32; }

/* Botón notificar cliente */
#btnNotificarCliente {
    width: 100%; padding: 16px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white; font-size: 1rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 10px;
    box-shadow: 0 4px 14px rgba(37,211,102,0.35);
    transition: all 0.2s; margin-bottom: 10px;
}
#btnNotificarCliente:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,211,102,0.45); }
#btnNotificarCliente:active { transform: translateY(0); }
#btnNotificarCliente:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
#btnNotificarCliente i { font-size: 1.2rem; }

/* Estado de notificación enviada */
.notif-enviada {
    display: none; align-items: center; gap: 8px;
    background: #d4edda; color: #155724; border: 1px solid #b2dfb9;
    border-radius: 10px; padding: 10px 14px; font-size: 0.85rem;
    margin-bottom: 10px;
}
body.dark-mode .notif-enviada { background: #152a1e; color: #6ee7a2; border-color: #2a4a32; }

/* Botón cliente abordo */
#btnClienteAbordo {
    width: 100%; padding: 16px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white; font-size: 1.05rem; font-weight: 700;
    cursor: pointer; display: none; align-items: center;
    justify-content: center; gap: 10px;
    box-shadow: 0 4px 14px rgba(40,167,69,0.35);
    transition: all 0.2s; margin-bottom: 10px;
    animation: pulseBtn 1.8s infinite;
}
@keyframes pulseBtn {
    0%, 100% { box-shadow: 0 4px 14px rgba(40,167,69,0.35); }
    50%       { box-shadow: 0 4px 22px rgba(40,167,69,0.65); }
}
#btnClienteAbordo:hover { transform: translateY(-1px); }
#btnClienteAbordo:active { transform: translateY(0); }
#btnClienteAbordo i { font-size: 1.2rem; }

/* Info fase BC */
#infoPuntoC {
    display: none; background: #f8f9fa; border-radius: 10px;
    padding: 12px 14px; font-size: 0.85rem; color: #555;
    border-left: 4px solid #dc3545; margin-bottom: 10px;
}
body.dark-mode #infoPuntoC { background: #2a2a2a; color: #ccc; border-left-color: #dc3545; }
#infoPuntoC strong { color: #dc3545; }

/* ================================================================
   CONTROL DE ACCESO — Estilos
   ================================================================ */

/* Pantalla pendiente de aprobación */
.pendiente-icon {
    font-size: 4rem;
    color: #ffc107;
    margin-bottom: 20px;
    animation: pendienteFloat 2.5s ease-in-out infinite;
}
@keyframes pendienteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.pendiente-status-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffc107;
    font-size: 0.95rem;
}

/* Header de pendientes en panel admin */
.pendientes-header-info {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.pendientes-header-info h3 { margin-bottom: 8px; }
.pendientes-header-info .contador-grande {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

/* Item pendiente */
.pendiente-item {
    border-left-color: #e67e22 !important;
    background: #fff8f0 !important;
    animation: pendienteSlideIn 0.3s ease-out;
}
body.dark-mode .pendiente-item {
    background: #2a2010 !important;
}
@keyframes pendienteSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Badge pendiente */
.usuario-rol.pendiente-badge {
    background: #e67e22;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

/* Botón aprobar */
.btn-rol.aprobar {
    background: #28a745;
    color: white;
}
.btn-rol.aprobar:hover {
    background: #218838;
}
.btn-rol.aprobar:active {
    transform: scale(0.95);
}

/* Botón rechazar */
.btn-rol.rechazar {
    background: #dc3545;
    color: white;
}
.btn-rol.rechazar:hover {
    background: #c82333;
}
.btn-rol.rechazar:active {
    transform: scale(0.95);
}

/* Botón revocar (en lista de usuarios activos) */
.btn-revocar {
    background: #6c757d !important;
    color: white !important;
    font-size: 0.75rem !important;
}
.btn-revocar:hover {
    background: #5a6268 !important;
}

/* Card de pendientes oculta cuando no hay */
#cardPendientes {
    transition: all 0.3s ease;
}
