/* 
 * PUERTA A PUERTA - SISTEMA DE DISEÑO VISUAL OVERHAUL
 * Inspiración: Apple Premium Minimalism, Claymorphism, Neumorphism
 * Paleta: Blanco Plástico, Gris Seda, Negro Pizarra y Verde iOS para estados verificados.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #f5f5f7;              /* Gris seda / Blanco Apple */
  --bg-dark: #e8e8ed;              /* Gris intermedio para contenedores hundidos */
  --bg-smoke: #ffffff;             /* Blanco sólido plástico */
  --bg-glass: rgba(255, 255, 255, 0.85); /* Vidrio satinado brillante */
  --bg-glass-bright: rgba(255, 255, 255, 0.95);
  
  --border-glass: rgba(0, 0, 0, 0.05);   /* Borde ultra sutil */
  --border-glow: rgba(0, 0, 0, 0.12);    /* Contorno plástico */
  
  --text-primary: #1d1d1f;         /* Negro pizarra Apple */
  --text-secondary: #515154;       /* Carbón oscuro */
  --text-muted: #86868b;           /* Gris cool / Textos secundarios */
  
  --accent-green: #34c759;         /* Verde iOS / Confirmado y Verificado */
  --accent-green-glow: rgba(52, 199, 89, 0.12);
  --accent-red: #ff3b30;           /* Rojo iOS / Cancelación o Disputas */
  --accent-red-glow: rgba(255, 59, 48, 0.12);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-deep: 0 15px 35px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02); /* Sombras Apple suaves */
  --shadow-glow: 0 4px 12px rgba(0, 0, 0, 0.02);
  --shadow-green: 0 8px 24px rgba(52, 199, 89, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #e2e2e9;
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* Deep radial spotlight vignette mimicking a physical 3D box or studio cavity */
  background-image: radial-gradient(circle at 50% 45%, #fdfdfd 0%, #ebebef 55%, #c0c0c9 100%);
  background-attachment: fixed;
}

#app-three-d-wrapper {
  perspective: 1200px;
  perspective-origin: 50% 30%;
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Contenedor de perspectiva 3D interno del fondo */
#app-three-d-bg-container {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: -2;
  perspective: 1200px;
  perspective-origin: 50% 30%;
}

/* Perspective Floor grid fading into the horizon center */
#app-three-d-bg-floor {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center center;
  transform: rotateX(80deg) translateZ(-250px) scale(2.2);
  opacity: 0.8;
  pointer-events: none;
  transform-origin: center top;
  /* Atmospheric depth fade: transparent at the horizon, opaque closer to viewer */
  mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 85%);
}

/* Perspective Ceiling grid enclosing the corridor space, fading into the horizon center */
#app-three-d-bg-ceiling {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center center;
  transform: rotateX(-80deg) translateZ(-250px) scale(2.2);
  opacity: 0.6;
  pointer-events: none;
  transform-origin: center bottom;
  /* Atmospheric depth fade: transparent at the horizon, opaque closer to viewer */
  mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 85%);
}


/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   CLAYMORPHISM & NEUMORPHIC UI PANELS
   ========================================================================== */

.glass-card {
  /* Premium multi-layered acryl reflection: specular glossy highlight + soft diagonal light sweep + white acryl backing */
  background: 
    linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.05) 42%, rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0.05) 48%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0) 75%),
    rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.95);
  outline: 1px solid rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  backdrop-filter: blur(30px) saturate(130%);
  -webkit-backdrop-filter: blur(30px) saturate(130%);
  /* Raised floating volume shadow: extremely soft ambient + deep shadow floor */
  box-shadow: 
    0 40px 80px rgba(0, 0, 0, 0.06),
    0 15px 30px rgba(0, 0, 0, 0.02),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.01);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  transform-style: flat;
  /* Flat 2D layout avoids perspective projection shift bugs */
  transform: none;
}

/* 3D Z-Fighting & Contrast Occlusion Fix: lifts all children DOM elements 
   physically in front of the glossy backgrounds and pseudo borders. */
.glass-card > * {
  position: relative;
  z-index: 5;
  transform: none;
}

/* Ensure all avatars and profile images are perfectly circular (not oval) and never squished in flexboxes */
.user-avatar-img,
.user-avatar-container,
.post-avatar,
.pub-author-avatar,
.comment-avatar,
.pin-avatar,
.chat-thread-avatar,
.chat-recipient-avatar,
#chat-win-header-avatar,
#modal-profile-avatar,
.admin-user-avatar,
img[src*="unsplash.com/photo-"][style*="border-radius:50%"],
img[src*="unsplash.com/photo-"][style*="border-radius: 50%"] {
  flex-shrink: 0 !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  align-self: center !important; /* Blocks cross-axis flex stretching on iOS WebKit */
}

/* Rigid physical scale stabilizers to completely prevent WebKit flex stretching from creating ovals */
.user-avatar-img {
  width: 48px !important;
  height: 48px !important;
}
.user-avatar-container {
  width: 48px !important;
  height: 48px !important;
  overflow: hidden;
  border-radius: 50% !important;
}
.post-avatar,
.pub-author-avatar {
  width: 44px !important;
  height: 44px !important;
}
.comment-avatar {
  width: 28px !important;
  height: 28px !important;
}
.pin-avatar {
  width: 24px !important;
  height: 24px !important;
}
.provider-card-avatar {
  width: 60px !important;
  height: 60px !important;
  align-self: center !important;
  flex-shrink: 0 !important;
  object-fit: cover !important;
}
.chat-thread-avatar {
  width: 40px !important;
  height: 40px !important;
}
.chat-recipient-avatar,
#chat-win-header-avatar {
  width: 38px !important;
  height: 38px !important;
}
#modal-profile-avatar {
  width: 110px !important;
  height: 110px !important;
}
.admin-user-avatar {
  width: 32px !important;
  height: 32px !important;
}

/* Specular border reflection wrapper (non-occluding) */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

.glass-card.interactive:hover {
  border-color: rgba(255, 255, 255, 1);
  /* Flat hover zoom and float to keep clicks perfectly aligned */
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 85px 150px rgba(0, 0, 0, 0.09),
    0 30px 60px rgba(0, 0, 0, 0.04),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -3px 6px rgba(0, 0, 0, 0.02);
}

/* Carved inputs with neomorphic inset depth */
.glass-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:focus {
  border-color: var(--border-glow);
  background: #ffffff;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.03), 0 0 0 4px rgba(0, 0, 0, 0.04);
}

/* Physical tactile neomorphic buttons */
.glass-btn {
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-family: var(--font-title);
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), inset 0 2px 3px rgba(255, 255, 255, 0.9);
}

/* Premium dynamic selection for express service buttons (v71 UX Improvement) */
.glass-btn.active {
  background: var(--text-primary) !important;
  color: #ffffff !important;
  border-color: var(--text-primary) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px) scale(1.02);
}
.glass-btn.active i {
  color: #ffffff !important;
}

.glass-btn:hover {
  background: #ffffff;
  border-color: var(--border-glow);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05), inset 0 2px 3px rgba(255, 255, 255, 0.9);
}

.glass-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08); /* Physical button click */
}

.glass-btn.primary {
  background: #1d1d1f;
  color: #ffffff;
  border-color: #1d1d1f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.glass-btn.primary:hover {
  background: #2d2d30;
  color: #ffffff;
  border-color: #2d2d30;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.glass-btn.primary:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.glass-btn.accent {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(52, 199, 89, 0.04);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.03);
}

.glass-btn.accent:hover {
  background: var(--accent-green);
  color: #ffffff;
  border-color: var(--accent-green);
  box-shadow: var(--shadow-green);
}

.glass-btn.accent:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   APP STRUCTURE (SPA & LANDING)
   ========================================================================== */

#landing-page {
  display: block;
  min-height: 100vh;
}

#app-dashboard {
  display: none;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ==========================================================================
   LANDING PAGE VISUALS
   ========================================================================== */

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(245, 245, 247, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.brand-text h1 {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1d1d1f 0%, #515154 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: -3px;
}

.hero-section {
  padding: 160px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(240, 240, 243, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.8rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #1d1d1f 30%, #86868b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 900px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* Features Grid */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin: 60px 0 30px;
  font-weight: 800;
  color: var(--text-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.feature-card {
  padding: 40px 30px;
  text-align: left;
}

.feature-icon {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  background: var(--bg-deep);
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer & legal disclaimer */
.disclaimer-section {
  max-width: 800px;
  margin: 0 auto 100px;
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--border-glass);
}

.disclaimer-section p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ==========================================================================
   APP SHELL NAVIGATION & LAYOUT
   ========================================================================== */

.app-container {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr); /* Ultimate grid blowout stabilizer (v63) */
  min-height: 100vh;
}

/* Sidebar Nav (Desktop) - Premium Polycarbonate Glossy vertical pane */
.app-sidebar {
  background: 
    linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.35) 42%, rgba(255, 255, 255, 0.75) 45%, rgba(255, 255, 255, 0.35) 48%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.03) 100%), 
    rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(35px) saturate(135%);
  -webkit-backdrop-filter: blur(35px) saturate(135%);
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.03), inset -1.5px 0 2px rgba(255, 255, 255, 0.85);
  transform: translate3d(0, 0, 20px);
  transform-style: preserve-3d;
  overflow-y: auto;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.sidebar-brand {
  margin-bottom: 35px;
}

.user-quick-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.user-avatar-container {
  position: relative;
  width: 48px;
  height: 48px;
}

.user-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.verified-badge-mini {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #ffffff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-size: 10px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.user-quick-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.user-quick-info span {
  font-size: 0.75rem;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* Mode Switcher Toggle */
.mode-toggle-card {
  padding: 15px;
  margin-bottom: 30px;
  background: #ffffff;
}

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-deep);
  border: 1px solid var(--border-glass);
  transition: .4s;
  border-radius: 34px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

input:checked + .slider {
  background-color: rgba(52, 199, 89, 0.1);
  border-color: rgba(52, 199, 89, 0.2);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: var(--accent-green);
}

/* Navigation Links */
.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  text-align: left;
  transition: var(--transition-fast);
}

.nav-item-btn:hover {
  background: var(--bg-deep);
  color: var(--text-primary);
}

.nav-item-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), inset 0 2px 3px rgba(255, 255, 255, 0.9);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Main App Work Area */
.app-content {
  padding: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  min-width: 0; /* Allows container to shrink dynamically inside grid */
}

.view-panel {
  display: none;
  animation: viewFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header & Switchers */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.dashboard-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
}

.dashboard-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Global Omni-Search carved inside the white plastic shell */
.omni-search-wrapper {
  margin-bottom: 40px;
  position: relative;
}

.omni-search-input {
  width: 100%;
  padding: 16px 24px 16px 60px;
  font-size: 1.1rem;
}

.search-icon-inside {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.3rem;
}

/* ==========================================================================
   SOCIAL FEED VIEW (MURO SOCIAL)
   ========================================================================== */

.feed-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}

.feed-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Post Creator Card */
.create-post-card {
  padding: 24px;
}

.post-create-area {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.post-input-box {
  flex-grow: 1;
  min-height: 80px;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 1rem;
  padding-top: 10px;
}

.post-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-glass);
  padding-top: 15px;
}

.post-attach-btns {
  display: flex;
  gap: 15px;
  color: var(--text-secondary);
}

.attach-btn {
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.attach-btn:hover {
  background: var(--bg-deep);
  color: var(--text-primary);
}

/* Feed Publications */
.publication-card {
  padding: 24px;
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pub-author {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.pub-author:hover .pub-author-meta h4 {
  color: var(--accent-green);
}

.pub-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.pub-author-meta h4 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.pub-author-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pub-tag {
  background: rgba(52, 199, 89, 0.06);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent-green);
  border: 1px solid rgba(52, 199, 89, 0.15);
  font-weight: 600;
}

.pub-content {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.pub-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 15px;
  margin-bottom: 15px;
}

.pub-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  font-weight: 500;
}

.pub-action-btn:hover {
  background: var(--bg-deep);
  color: var(--text-primary);
}

.pub-action-btn.liked {
  color: var(--accent-red);
}

/* Comments Block under Light Theme */
.pub-comments-section {
  background: rgba(0, 0, 0, 0.015);
  border-radius: var(--radius-md);
  padding: 18px;
  border-top: 1px solid var(--border-glass);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

.comment-item {
  display: flex;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-bubble {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  flex-grow: 1;
  border: 1px solid var(--border-glass);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.comment-author {
  font-weight: 700;
  margin-bottom: 3px;
}

.comment-input-area {
  display: flex;
  gap: 10px;
}

.comment-input {
  flex-grow: 1;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

/* Sidebar Widgets */
.feed-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.trending-widget {
  padding: 24px;
}

.trending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.trending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
}

.trending-item:hover h5 {
  color: var(--accent-green);
}

.trending-item h5 {
  font-size: 0.95rem;
  margin-bottom: 2px;
  transition: var(--transition-fast);
}

.trending-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GEOLOCATION PROXIMITY MAP VIEW
   ========================================================================== */

.map-wrapper {
  height: 500px;
  position: relative;
  background: #e2e2e9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.05);
}

.map-mock-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  filter: grayscale(10%) contrast(1.1) brightness(0.95);
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  animation: pinBounce 1s infinite alternate;
}

@keyframes pinBounce {
  from { transform: translate(-50%, -100%) translateY(0); }
  to { transform: translate(-50%, -100%) translateY(-6px); }
}

.pin-circle {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 3px solid var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15), 0 0 10px rgba(52, 199, 89, 0.3);
}

.pin-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.map-controls-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.95);
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  padding: 15px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.95);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.green { background: var(--accent-green); }
.legend-dot.blue { background: #3b82f6; }

/* Map User Cards Slider */
.map-slider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.provider-match-card {
  padding: 20px;
  display: flex;
  gap: 15px;
}

.provider-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.provider-card-details h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.provider-card-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.provider-card-details .distance-tag {
  display: inline-block;
  background: var(--bg-deep);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--border-glass);
  font-weight: 600;
}

/* ==========================================================================
   ESCROW FLOW TRACKER VIEW
   ========================================================================== */

.escrow-flow-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
}

.escrow-visualizer {
  padding: 30px;
}

.escrow-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.escrow-step-item {
  padding: 20px 15px;
  text-align: center;
  opacity: 0.4;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.escrow-step-item.completed {
  opacity: 0.8;
  border-color: rgba(52, 199, 89, 0.4);
  background: rgba(52, 199, 89, 0.02);
}

.escrow-step-item.active {
  opacity: 1;
  border-color: var(--accent-green);
  background: rgba(52, 199, 89, 0.06);
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.1), inset 0 2px 2px rgba(255,255,255,0.9);
  transform: scale(1.03);
}

.step-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-green);
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
}

.step-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.escrow-simulation-controls {
  padding: 24px;
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.escrow-state-info {
  padding: 24px;
}

.escrow-state-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.escrow-state-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==========================================================================
   INTEGRATED WALLET VIEW
   ========================================================================== */

.wallet-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Apple Card Physical Titanium Aesthetic */
.wallet-card-visual {
  background: linear-gradient(135deg, #ffffff 0%, #e2e2e9 100%);
  padding: 35px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06), inset 0 2px 2px rgba(255, 255, 255, 0.9);
  aspect-ratio: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.wallet-card-visual::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 80%);
  pointer-events: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 1;
}

.card-top h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 700;
}

.card-middle {
  margin: 25px 0;
  z-index: 1;
}

.card-middle .balance-figure {
  font-size: 2.8rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.card-middle .escrow-pending {
  font-size: 0.9rem;
  color: var(--accent-green);
  margin-top: 5px;
  font-weight: 600;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 1;
  font-weight: 600;
}

/* Transactions list under Light theme */
.transactions-widget {
  padding: 30px;
}

.transaction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 10px rgba(0,0,0,0.015);
}

.tx-meta h5 {
  font-size: 0.95rem;
  font-weight: 700;
}

.tx-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tx-amount {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
}

.tx-amount.positive {
  color: var(--accent-green);
}

.tx-amount.negative {
  color: var(--accent-red);
}

/* ==========================================================================
   LIVE CHAT SYSTEM VIEW (iMessage Satin Aesthetic)
   ========================================================================== */

.chat-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 250px); /* Adjusted to fit laptop screens perfectly without clipping */
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

.chat-sidebar {
  border-right: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.005);
  display: flex;
  flex-direction: column;
}

.chat-list-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-glass);
}

.chat-thread-list {
  flex-grow: 1;
  overflow-y: auto;
}

.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition-fast);
}

.chat-thread-item:hover, .chat-thread-item.active {
  background: var(--bg-deep);
}

.chat-thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-thread-info {
  flex-grow: 1;
}

.chat-thread-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
}

.chat-thread-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-thread-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.chat-thread-status.online {
  background: var(--accent-green);
  box-shadow: var(--shadow-green);
}

/* Chat Main window */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-win-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.01);
}

.chat-recipient-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-recipient-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-recipient-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-recipient-meta span {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 600;
}

.chat-messages-area {
  flex-grow: 1;
  min-height: 0;
  padding: 25px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: var(--bg-deep);
}

.msg-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.msg-bubble-wrapper.received {
  align-self: flex-start;
}

.msg-bubble-wrapper.sent {
  align-self: flex-end;
}

.msg-bubble {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
}

.msg-bubble-wrapper.received .msg-bubble {
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 0;
  color: var(--text-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.015);
}

.msg-bubble-wrapper.sent .msg-bubble {
  background: var(--accent-green);
  color: #ffffff;
  border-bottom-right-radius: 0;
  box-shadow: var(--shadow-green);
  font-weight: 500;
}

.msg-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 5px;
  align-self: flex-end;
}

.chat-input-area {
  padding: 20px 25px;
  border-top: 1px solid var(--border-glass);
  background: #ffffff;
  display: flex;
  gap: 15px;
  align-items: center;
}

.chat-text-input {
  flex-grow: 1;
}

/* ==========================================================================
   IDENTITY VERIFICATION FORM VIEW
   ========================================================================== */

.verification-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
}

.verification-header {
  text-align: center;
  margin-bottom: 45px;
}

.verification-header .verification-icon-large {
  font-size: 3.5rem;
  color: var(--accent-green);
  text-shadow: var(--shadow-green);
  margin-bottom: 15px;
  display: inline-block;
}

.verification-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 35px;
}

.form-full-width {
  grid-column: 1 / -1;
}

.file-upload-drag {
  border: 2px dashed rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-deep);
}

.file-upload-drag:hover {
  border-color: var(--border-glow);
  background: #ffffff;
  box-shadow: var(--shadow-deep);
}

.membership-plan-box {
  background: rgba(52, 199, 89, 0.04);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.membership-text h4 {
  font-size: 1.1rem;
  color: var(--accent-green);
  font-weight: 700;
}

.membership-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   ADMIN PANEL DASHBOARD
   ========================================================================== */

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
#view-admin {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.metric-card {
  padding: 25px;
}

.metric-card h5 {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}

.metric-number {
  font-size: 2.2rem;
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-trend {
  font-size: 0.8rem;
  color: var(--accent-green);
  margin-top: 5px;
  font-weight: 600;
}

.admin-action-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}

/* Table styling for verification reviews */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-table th, .admin-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.admin-table th {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.status-indicator-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-indicator-badge.pending {
  background: rgba(255, 149, 0, 0.12);
  color: #ff9500;
  border: 1px solid rgba(255, 149, 0, 0.25);
}

.status-indicator-badge.approved {
  background: var(--accent-green-glow);
  color: var(--accent-green);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

/* ==========================================================================
   MOBILE PWA CUSTOMIZATIONS (BOTTOM NAVIGATION BAR)
   ========================================================================== */

.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-glass);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.03);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  gap: 4px;
  width: 60px;
  height: 100%;
  transition: var(--transition-fast);
  font-weight: 600;
}

.mobile-nav-btn i {
  font-size: 1.3rem;
}

.mobile-nav-btn.active {
  color: var(--text-primary);
}

/* Dynamic notification badge */
.notification-dot-wrapper {
  position: relative;
}

.notification-badge-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent-red);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-red);
}

/* Table overflow scroll locks in admin panels */
.admin-action-split > *, .admin-users-console > * {
  min-width: 0 !important;
}

/* ==========================================================================
   MULTIMEDIA & PREVIEWS GALLERY SYSTEM (v23)
   ========================================================================== */

.pub-media-wrapper {
  margin-top: 15px;
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pub-media-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pub-media-grid {
  margin-top: 15px;
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.pub-media-grid > div {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.pub-media-grid > div:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.media-preview-box {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.media-preview-box:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.media-preview-box .remove-media-btn:hover {
  background: var(--accent-red) !important;
  transform: scale(1.1);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE STYLING)
   ========================================================================== */

@media (max-width: 1280px) {
  /* Estabilización total de ancho y viewport para Safari en iPhones */
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative !important;
    background-attachment: scroll !important; /* Evita repintados costosos y saltos de escala en iOS */
  }

  /* Flatten 3D perspective to fix iOS Safari sideways scrolling zoom */
  #app-three-d-wrapper {
    perspective: none !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }

  /* Desactivación absoluta de las mallas 3D proyectadas en móviles para estabilizar el viewport y bloquear el zoom de Safari */
  #app-three-d-bg-clip-wrapper {
    display: none !important;
  }
  .glass-card {
    transform: none !important;
    transform-style: flat !important;
    max-width: 100% !important;
  }
  .glass-card.interactive:hover {
    transform: none !important;
    box-shadow: var(--shadow-glass) !important;
  }
  .app-sidebar {
    transform: none !important;
  }
  
  /* Disable automatic iOS input zoom by ensuring font-size >= 16px */
  .glass-input, 
  .post-input-box, 
  .chat-text-input, 
  textarea, 
  input, 
  select {
    font-size: 16px !important;
  }

  #app-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-container {
    display: block !important; /* Desactiva CSS grid en móviles para eliminar desajustes laterales */
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .app-sidebar {
    display: none;
  }
  
  /* Fixed Top Header on Mobile with Frosted blur and saturating */
  .dashboard-header {
    position: fixed !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    width: auto !important; /* Estiramiento simétrico viewport */
    height: 70px;
    z-index: 1000;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px !important; /* Reducido de 20px a 12px para evitar el desbordamiento lateral */
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(25px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(140%) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    margin-bottom: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  }
  
  .dashboard-title h2 {
    font-size: 1.25rem !important; /* Ligeramente más compacto */
    letter-spacing: -0.03em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 140px !important; /* Prevents wrapping and overlapping */
  }
  
  .dashboard-title p {
    display: none !important; /* Hide subtitle for neat header */
  }

  .header-actions {
    gap: 8px !important; /* Reducir gap en móviles para ahorrar espacio horizontal */
  }

  /* Compactación adicional de cabecera y dock para teléfonos muy estrechos */
  #label-toggle-mode-mobile {
    display: none !important; /* Always hide mode label on mobile to save vertical space */
  }
  @media (max-width: 380px) {
    .dashboard-header {
      padding: 0 8px !important; /* Ahorro adicional de padding lateral */
    }
    .mobile-nav-bar {
      left: 10px !important;
      right: 10px !important;
      bottom: 10px !important;
    }
  }

  .mobile-mode-toggle-wrapper {
    display: flex !important; /* Expose compact toggle switch */
  }

  /* Compact responsive checkbox re-scale for header */
  .mobile-mode-toggle-wrapper .switch {
    width: 42px !important;
    height: 22px !important;
  }
  .mobile-mode-toggle-wrapper .switch input:checked + .slider:before {
    transform: translateX(20px) !important;
  }
  .mobile-mode-toggle-wrapper .slider:before {
    height: 16px !important;
    width: 16px !important;
    left: 3px !important;
    bottom: 3px !important;
  }
  
  .app-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    padding-top: 105px !important; /* Spacing to prevent fixed header overlap (v61) */
    padding-bottom: 100px !important; /* Spacing to prevent fixed floating nav overlap */
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Compactación de tarjetas en Muro y Billetera para móviles (v23) */
  .create-post-card, 
  .publication-card {
    padding: 16px !important;
  }

  .pub-header {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .pub-tag {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
  }

  /* Compactación y escalado de Billetera (Titanio) en móviles (v23) */
  .wallet-card-visual {
    aspect-ratio: auto !important;
    min-height: 175px !important;
    padding: 20px !important;
  }

  .wallet-card-visual .balance-figure {
    font-size: 2.1rem !important;
  }

  .wallet-card-visual .card-bottom {
    flex-wrap: wrap !important;
    gap: 8px !important;
    font-size: 0.75rem !important;
  }

  .transactions-widget {
    padding: 16px !important;
  }

  /* Compactar todas las tarjetas en la sección de billetera */
  #view-wallet .glass-card {
    padding: 16px !important;
  }
  
  /* Restablecer padding de la tarjeta visual para conservar sus 20px */
  #view-wallet .wallet-card-visual {
    padding: 20px !important;
  }
  
  /* Floating Glassmorphic Dock type island */
  .mobile-nav-bar {
    display: flex !important;
    position: fixed;
    bottom: 15px;
    left: 15px !important;
    right: 15px !important;
    width: auto !important; /* Fuerza el centrado estricto y adaptativo en cualquier ancho de iPhone */
    height: 65px;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.2) !important; /* Opacidad al 20% para transparencia e interactividad premium */
    backdrop-filter: blur(12px) saturate(190%) !important; /* Desenfoque más suave (12px en vez de 25px) y saturación incrementada (190%) para que los colores y formas fluyan y sean visibles al pasar por detrás */
    -webkit-backdrop-filter: blur(12px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important; /* Borde reflectante de cristal más definido */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.5) !important; /* Sombreado de alta definición */
    z-index: 1000;
    padding: 0 10px; /* Más espacio horizontal para evitar recortes */
    padding-bottom: 0 !important;
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0% !important; /* Distribuye espacio proporcionalmente por igual */
    width: auto !important;   /* Cancela los 60px fijos */
    min-width: 0 !important;  /* Impide el desbordamiento de caja */
    height: 100% !important;
    color: var(--text-secondary) !important;
    font-size: 0.65rem !important; /* Fuente ligeramente compacta para evitar saltos y recortes */
    line-height: 1.15 !important;
    gap: 3px !important;
    padding: 4px 2px !important;
    text-align: center !important;
    transition: var(--transition-fast);
  }

  .mobile-nav-btn.active {
    color: var(--accent-green) !important;
  }
  
  .feed-layout {
    grid-template-columns: 1fr;
  }
  
  .wallet-layout {
    grid-template-columns: 1fr;
  }
  
  .escrow-flow-container {
    grid-template-columns: 1fr;
  }
  
  .chat-container {
    grid-template-columns: 1fr;
    height: calc(100vh - 240px); /* Fit mobile screen perfectly above nav bar */
    margin-bottom: 90px; /* Force spacing above fixed bottom nav bar */
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  }
  
  .chat-sidebar {
    display: none;
  }
  
  .chat-input-area {
    padding: 12px 15px; /* Optimize space on mobile screen */
    gap: 10px;
  }
  
  .escrow-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 15px 20px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
  
  .verification-form-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .admin-action-split {
    grid-template-columns: 1fr;
  }
  .admin-users-console {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .landing-nav {
    padding: 10px 12px;
  }
  
  .brand-wrapper {
    gap: 8px;
  }
  
  .brand-text span {
    display: none; /* Ocultar 'Trabajo Humano' en pantallas muy estrechas para evitar desbordamiento */
  }
  
  .brand-text h1 {
    font-size: 1.05rem; /* Ajustar tamaño de la marca */
  }
  
  .app-logo-img {
    width: 32px;
    height: 32px;
  }
  
  #btn-enter-app {
    padding: 8px 12px;
    font-size: 0.78rem;
  }
  
  .landing-nav-btns {
    gap: 8px !important;
  }
  
  #lang-switch-landing {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }
}

@media (max-width: 768px) {
  .hero-glow {
    width: 280px !important;
    height: 280px !important;
  }
}

/* Autopilot & Escalated Dual-Role Escrow CSS */
input, textarea, select {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

.autopilot-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  transition: var(--transition-smooth);
}

.autopilot-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autopilot-info p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.role-guidance-box {
  background: rgba(59, 130, 246, 0.05);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(59, 130, 246, 0.04);
}

.role-guidance-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #3b82f6;
}

.gps-progress-track {
  background: rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  height: 8px;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 15px 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.gps-progress-bar {
  background: linear-gradient(90deg, #3b82f6 0%, #00e676 100%);
  height: 100%;
  width: 100%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
}

.countdown-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #10b981;
  margin: 15px 0;
}

.spinning-gear {
  animation: spin 2.5s linear infinite;
  font-size: 1.2rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.glowing-btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(52, 199, 89, 0.4);
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  }
  100% {
    box-shadow: 0 0 24px rgba(52, 199, 89, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  }
}

@keyframes pulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ==========================================================================
   UNIFIED PREMIUM GLASSMORPHIC MODAL SYSTEM
   ========================================================================== */

/* Body scroll lock */
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(29, 29, 31, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none; /* Flex when toggled active */
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden; /* Lock overflow of outer overlay */
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 90%;
  max-width: 550px;
  padding: 30px;
  position: relative;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  max-height: 82vh; /* Comfortable safe boundaries */
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(35px) saturate(130%);
  -webkit-backdrop-filter: blur(35px) saturate(130%);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fixed Close Button (desktop style) */
#btn-close-profile-modal {
  position: fixed;
  top: 25px;
  right: 25px;
  background: var(--bg-glass-bright);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-fast);
  z-index: 10001;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

#btn-close-profile-modal:hover {
  transform: scale(1.05);
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

/* Inner Close Button (only displayed on mobile bottom sheet card) */
.modal-close-in-card {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  display: none; /* Managed by mobile media queries */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.modal-close-in-card:hover {
  background: var(--bg-dark);
}

/* iOS Bottom Sheet Drag Handle indicator */
.modal-drag-handle {
  display: none;
  width: 36px;
  height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  margin: -10px auto 20px auto;
  flex-shrink: 0;
}

/* Premium Apple-inspired Bottom Sheet Overhaul for Mobile Viewports */
@media (max-width: 576px) {
  .modal-overlay {
    align-items: flex-end; /* Align sheet to bottom */
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom)) 20px; /* Safe padding for screen bottom curves */
    border-radius: 28px 28px 0 0; /* Premium top curve bottom-sheet */
    max-height: 88vh; /* Maximum vertical comfort reach */
    border-bottom: none;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.06);
    animation: slideUpMobile 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  
  .modal-drag-handle {
    display: block; /* Render visual drag indicator */
  }
  
  .modal-close-in-card {
    display: flex; /* Display inner card tap close icon */
  }
  
  #btn-close-profile-modal {
    display: none !important; /* Hide floating corner button */
  }

  /* Responsive layout overrides to prevent grid compression and text clipping */
  .modal-content div[style*="grid-template-columns:1fr 1fr"],
  .modal-content div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ==========================================================================
   VERSION 24 FIXES: TABLE RESPONSIVENESS, WALLET MOBILES & MODE TOGGLES
   ========================================================================== */

/* 1. Responsiveness for Admin Tables and CSS grid items */
.table-responsive {
  width: 100%;
  max-width: 100%;
  display: block;
  max-height: 480px; /* Limits the height to trigger vertical scroll when there are many users */
  overflow-x: auto !important;
  overflow-y: auto !important; /* Enables vertical scrolling */
  -webkit-overflow-scrolling: touch;
  margin-top: 15px;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 20; /* Lifts content stack layer to make it interactive */
}

/* Sticky headers so column labels remain visible when scrolling down vertically */
.table-responsive .admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff; /* Solid white background to hide scrolling elements underneath */
  box-shadow: inset 0 -1px 0 var(--border-glass); /* Standard cell separator border */
}

/* Disable 3D transforms on Admin View glass cards and their children to prevent Chromium scrollbar pointer lock bugs */
#view-admin .glass-card {
  transform: none !important;
  transform-style: flat !important;
}
#view-admin .glass-card > * {
  transform: none !important;
}

/* Custom premium scrollbar for table scrolling */
.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 100px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 100px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid transparent;
  background-clip: padding-box;
}

/* Prevent cell breaking */
.admin-table {
  width: 100%;
  white-space: nowrap;
}

/* 2. Payment method row flex layout and mobile grid adaptivity */
.payment-method-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Wallet Card visual compact scaling for tablets and small laptops */
@media (max-width: 768px) {
  .wallet-card-visual {
    padding: 16px !important;
    min-height: 150px !important;
  }
  .wallet-card-visual .balance-figure {
    font-size: 1.9rem !important;
  }
}

/* Extra adaptive scaling for narrow smartphones (iPhone SE, etc.) */
@media (max-width: 480px) {
  .wallet-card-visual {
    padding: 14px !important;
    min-height: 140px !important;
  }
  .wallet-card-visual .balance-figure {
    font-size: 1.65rem !important;
  }
  /* Force vertical apilation to avoid card bottom horizontal overflows */
  .wallet-card-visual .card-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  
  /* Make the payment methods row fit gracefully */
  .payment-method-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  
  .payment-method-row .glass-btn {
    padding: 8px 4px !important;
    font-size: 0.75rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .payment-method-row .glass-btn i {
    margin-right: 2px !important;
  }
}

/* Unified Premium Share Modal Styling */
.share-social-btn {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-social-btn:hover {
  transform: translateY(-3px);
}

.share-social-btn:active {
  transform: translateY(-1px);
}

/* ==========================================================================
   VERSION 27 ADDITIONS: AUTH, EXONERATION, PRIVACY & CHAT SUPERVISOR
   ========================================================================== */

/* Glass Button Disabled State with Frost Effect */
.glass-btn:disabled,
.glass-btn[disabled],
.glass-btn.disabled-btn {
  opacity: 0.45 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  backdrop-filter: blur(8px) saturate(40%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(40%) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

/* Phone Number Privacy Visual Masking */
.protected-phone-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-glass);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.protected-phone-container i {
  color: var(--accent-red);
}

.protected-phone {
  filter: blur(4.5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.75;
  transition: all 0.3s ease;
  font-family: monospace;
}

/* Admin Chat Supervisor Scrolling Customizations */
#admin-supervisor-threads-list::-webkit-scrollbar,
#admin-supervisor-messages-box::-webkit-scrollbar {
  width: 6px;
}
#admin-supervisor-threads-list::-webkit-scrollbar-track,
#admin-supervisor-messages-box::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 100px;
}
#admin-supervisor-threads-list::-webkit-scrollbar-thumb,
#admin-supervisor-messages-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 100px;
}
#admin-supervisor-threads-list::-webkit-scrollbar-thumb:hover,
#admin-supervisor-messages-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Admin Chat Supervisor Interactive Elements */
.admin-supervisor-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-supervisor-thread-item:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1.5px);
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-supervisor-thread-item.active {
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.35);
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.08);
}

.admin-supervisor-thread-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: var(--accent-green);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-supervisor-thread-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-supervisor-thread-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-supervisor-thread-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-supervisor-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: var(--shadow-glow);
}

.admin-supervisor-msg-bubble.incoming {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  align-self: flex-start;
  border-top-left-radius: 2px;
  color: var(--text-primary);
}

.admin-supervisor-msg-bubble.outgoing {
  background: rgba(52, 199, 89, 0.16);
  border: 1px solid rgba(52, 199, 89, 0.25);
  align-self: flex-end;
  border-top-right-radius: 2px;
  color: var(--text-primary);
}

/* --- ADDED FOR PWA v28: PROFILE CUSTOMIZATION AND NAVIGATION --- */

/* Clickable Sidebar profile */
.user-quick-profile {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.user-quick-profile:hover {
  background: var(--bg-glass-bright) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: var(--shadow-glow), 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

.user-quick-profile:active {
  transform: translateY(0) scale(0.98);
}

/* Post avatar & mobile header profile interactive transitions */
.post-avatar, #btn-mobile-my-profile {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.post-avatar:hover, #btn-mobile-my-profile:hover {
  transform: scale(1.08);
  border-color: var(--accent-green) !important;
  box-shadow: var(--shadow-glow) !important;
}

.post-avatar:active, #btn-mobile-my-profile:active {
  transform: scale(0.95);
}

/* Comment authors interactive links */
.comment-author {
  cursor: pointer;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.comment-author:hover {
  color: var(--accent-green) !important;
  text-shadow: 0 0 5px rgba(52, 199, 89, 0.3);
}

.comment-avatar-node {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-avatar-node:hover {
  transform: scale(1.1);
}

/* Avatar presets grid styling inside the edit profile modal */
.avatar-preset-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.avatar-preset-btn:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: rgba(52, 199, 89, 0.5);
  box-shadow: 0 4px 10px rgba(52, 199, 89, 0.3);
}

.avatar-preset-btn:active {
  transform: scale(0.95);
}

.avatar-preset-btn.active {
  border-color: var(--accent-green);
  transform: scale(1.2);
  box-shadow: var(--shadow-glow);
}

.avatar-preset-btn img, .avatar-preset-btn svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* --- ADDED FOR PWA v32: ADMIN GATEWAYS AND BANK INTEGRATIONS --- */

.admin-sub-tab-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.admin-sub-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.admin-sub-tab-btn.active {
  background: rgba(0, 230, 118, 0.1) !important;
  color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25) !important;
  font-weight: 700;
}

/* Financial console split responsiveness (v62 stacked at 1280px for tablet stability) */
@media (max-width: 1280px) {
  .admin-financial-console-split {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  #pending-bank-deposits-wrapper {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 0 !important;
    padding-bottom: 20px;
  }
}

/* Checkout modals and payments styling */
.checkout-modal-card {
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.deposit-payment-method {
  transition: all 0.2s ease !important;
}

.deposit-payment-method.active {
  background: rgba(0, 230, 118, 0.15) !important;
  color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3) !important;
}

/* Premium active state styling for admin list actions (Verify & Marketing) (v48) */
.admin-toggle-active {
  background: #34c759 !important; /* Vibrant high-contrast iOS Apple Green */
  color: #ffffff !important; /* Pure white text and icon for maximum visibility */
  border-color: #28a745 !important;
  box-shadow: 0 4px 10px rgba(52, 199, 89, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  text-shadow: none !important;
}

.admin-toggle-active:hover {
  background: #2ebd50 !important; /* Richer green on hover */
  border-color: #218838 !important;
  box-shadow: 0 6px 14px rgba(52, 199, 89, 0.45) !important;
}

/* PUPPET PREMIUM INDICATOR BADGE (v58) */
.puppet-badge-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ff9800;
  border-radius: 2px;
  margin-left: 6px;
  box-shadow: 0 0 6px rgba(255, 152, 0, 0.4);
  vertical-align: middle;
  cursor: help;
}

/* ==========================================================================
   VERSION 59 LOGISTICS: CHIPS, AUTO-MATCHING & COURIER FORMS
   ========================================================================== */

/* 1. Horizontal Category Chips */
.category-shortcuts-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 4px 12px 4px;
  margin: 15px 0 10px 0;
  scrollbar-width: none; /* Hide standard scrollbar in Firefox */
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.category-shortcuts-bar::-webkit-scrollbar {
  display: none; /* Hide standard scrollbar in Chrome/Safari */
}
.category-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass-bright);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.category-chip:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-glow), 0 4px 12px rgba(0, 0, 0, 0.05);
}
.category-chip.active {
  background: rgba(0, 230, 118, 0.1) !important;
  color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25) !important;
}

/* 2. Auto matching floating button */
.auto-match-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #00e676 100%) !important;
  border: none !important;
  color: #000000 !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.auto-match-btn:hover {
  transform: scale(1.05) translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 230, 118, 0.5) !important;
}

/* 3. Driver / Courier sub-form */
.courier-subform {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 15px;
  padding-top: 15px;
  display: none; /* Shown dynamically with accordion */
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.courier-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.courier-role-select {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.courier-role-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.courier-role-btn.active {
  background: var(--bg-glass-bright);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 4. Real-time path simulation dot */
.sim-gps-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #3b82f6, 0 0 20px #3b82f6;
  z-index: 50;
  transition: all 1s linear; /* Smooth linear animation */
}

/* PWA v60+: Custom Responsive Form & Checkboxes Grid Classes */
.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
}

.admin-params-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 576px) {
  .admin-checkbox-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .admin-params-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 380px) {
  .admin-checkbox-grid {
    grid-template-columns: 1fr !important;
  }
}

/* PWA v62: Laptop Viewport Responsiveness Stability Fixes */
@media (min-width: 1281px) and (max-width: 1480px) {
  .admin-action-split {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .admin-users-console {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
  .admin-financial-console-split {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  #pending-bank-deposits-wrapper {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 0 !important;
    padding-bottom: 20px;
  }
  .app-content {
    padding: 24px 30px !important;
  }
}

/* ==========================================================================
   SKEUOMORPHIC 3D XBOX-STYLE ACRYLIC CONTROLLER BUTTON (v80)
   ========================================================================== */

#btn-quick-automatch {
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 95px !important;
  
  /* Spherical dome shader to simulate bulging in the center */
  background: 
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.25) 45%, rgba(0, 0, 0, 0.1) 80%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(0, 230, 118, 0.85) 100%) !important;
  
  /* 3D Convex Bevel Borders */
  border-top: 3px solid rgba(255, 255, 255, 0.75) !important;
  border-left: 2px solid rgba(255, 255, 255, 0.4) !important;
  border-right: 2px solid rgba(0, 0, 0, 0.22) !important;
  border-bottom: 5px solid rgba(0, 0, 0, 0.42) !important;
  border-radius: 24px !important;
  
  /* Convex ambient volume shadow + inner light refraction */
  box-shadow: 
    0 18px 36px rgba(0, 230, 118, 0.35), 
    0 6px 14px rgba(0, 0, 0, 0.18),
    inset 0 8px 12px rgba(255, 255, 255, 0.5), 
    inset 0 -10px 14px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  
  /* Physical tilt in 3D space */
  transform: perspective(600px) rotateX(4deg) translateZ(10px) !important;
  transform-style: preserve-3d !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Shiny Specular curved reflection crescent overlay, simulating thick crystal cover */
#btn-quick-automatch::before {
  content: '' !important;
  position: absolute !important;
  top: 2px !important;
  left: 6% !important;
  width: 88% !important;
  height: 35% !important;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%) !important;
  border-radius: 20px 20px 50px 50px / 12px 12px 18px 18px !important;
  pointer-events: none !important;
  z-index: 10 !important;
  opacity: 0.92 !important;
}

/* Specular light sweep on hover */
#btn-quick-automatch:hover {
  transform: perspective(600px) rotateX(1deg) translateY(-4px) translateZ(18px) scale(1.025) !important;
  box-shadow: 
    0 24px 45px rgba(0, 230, 118, 0.48), 
    0 8px 20px rgba(0, 0, 0, 0.22),
    inset 0 12px 18px rgba(255, 255, 255, 0.6), 
    inset 0 -8px 12px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
}

/* Mechanical press compression shadow */
#btn-quick-automatch:active {
  transform: perspective(600px) rotateX(8deg) translateY(2px) translateZ(2px) scale(0.97) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.5) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 
    0 6px 12px rgba(0, 230, 118, 0.2), 
    0 2px 5px rgba(0, 0, 0, 0.15),
    inset 0 3px 6px rgba(255, 255, 255, 0.25), 
    inset 0 -14px 20px rgba(0, 0, 0, 0.45) !important;
}

/* Engraved / Debossed branding text inside the solid acrylic crystal */
.debossed-brand-text {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  letter-spacing: 1.8px !important;
  color: #ffffff !important; /* Crisp, vibrant premium white */
  text-shadow: 
    -1px -1.5px 0px rgba(0, 0, 0, 0.45),  /* Sharp top-left engraving bevel shadow, no blur! */
    1px 1px 0px rgba(255, 255, 255, 0.8) !important; /* Sharp bottom-right highlight reflection edge, no blur! */
  text-transform: uppercase !important;
  line-height: 1.1 !important;
  z-index: 2 !important;
  position: relative !important;
}

/* Embedded crystal deep look for background items - Razor sharp, no blur! */
.embedded-crystal-text {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.9) !important; /* Crisp, high-contrast semi-translucent white */
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 0px rgba(0, 0, 0, 0.3) !important; /* Sharp shadow, no blur! */
  opacity: 1 !important;
  z-index: 1 !important;
  position: relative !important;
  filter: none !important; /* Removed all blur! */
}

.embedded-crystal-icons {
  display: flex !important;
  gap: 12px !important;
  margin-top: 4px !important;
  opacity: 0.85 !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 1 !important;
  position: relative !important;
}

.embedded-crystal-icons i {
  font-size: 0.75rem !important;
  color: #ffffff !important; /* Crisp white icons */
  text-shadow: 0 1px 0px rgba(0, 0, 0, 0.3) !important; /* Sharp shadow, no blur! */
  filter: none !important; /* Removed all blur! */
}

/* --- ADMIN ALERTS INBOX SYSTEM STYLES (v85) --- */
.admin-alerts-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Flashing red LED indicator for pending critical requests */
.led-indicator {
  width: 9px;
  height: 9px;
  background-color: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-red);
  display: inline-block;
  animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(255, 82, 82, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
  }
}

.alerts-list-container {
  overflow-y: auto;
  max-height: 280px;
  padding-right: 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alerts-list-container::-webkit-scrollbar {
  width: 5px;
}
.alerts-list-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.alerts-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.alerts-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.admin-alert-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.admin-alert-item.alert-pending {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #8f8bf8;
}

.admin-alert-item.alert-pending.critical-withdrawal {
  border-left: 3px solid #ffc439;
  background: rgba(255, 196, 57, 0.04);
}

.admin-alert-item.alert-pending.critical-dispute {
  border-left: 3px solid var(--accent-red);
  background: rgba(255, 82, 82, 0.04);
  animation: border-flash-red 2s infinite alternate;
}

@keyframes border-flash-red {
  0% { border-left-color: rgba(255, 82, 82, 0.4); }
  100% { border-left-color: rgba(255, 82, 82, 1); }
}

.admin-alert-item.alert-viewed {
  opacity: 0.55;
  border-left: 3px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.1);
}

.admin-alert-icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-alert-icon-wrapper.icon-user {
  color: #3498db;
  background: rgba(52, 152, 219, 0.08);
  border-color: rgba(52, 152, 219, 0.15);
}
.admin-alert-icon-wrapper.icon-deposit {
  color: var(--accent-green);
  background: rgba(0, 230, 118, 0.08);
  border-color: rgba(0, 230, 118, 0.15);
}
.admin-alert-icon-wrapper.icon-withdrawal {
  color: #ffc439;
  background: rgba(255, 196, 57, 0.08);
  border-color: rgba(255, 196, 57, 0.15);
}
.admin-alert-icon-wrapper.icon-dispute {
  color: var(--accent-red);
  background: rgba(255, 82, 82, 0.12);
  border-color: rgba(255, 82, 82, 0.22);
}

/* --- HISTORICAL ARCHIVING & SAFETY-PRUNING CONSOLE STYLES (v86) --- */
.db-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.db-stat-box {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.db-stat-box .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.db-stat-box .stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
}

.db-stat-box.stat-locked {
  border-left: 3px solid var(--accent-green);
  background: rgba(0, 230, 118, 0.02);
}

.db-stat-box.stat-prunable {
  border-left: 3px solid var(--accent-red);
  background: rgba(255, 82, 82, 0.02);
}

.backup-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .backup-download-grid {
    grid-template-columns: 1fr;
  }
}

.backup-card-panel {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-card-panel h6 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  font-size: 0.8rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-backup-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* ==========================================================================
   VOICE ASSISTANT & GALAXY PORTAL WORMHOLE STYLES (v88)
   ========================================================================== */

/* Botón del micrófono flotante y anillo de pulso */
.voice-trigger-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.voice-trigger-btn:hover {
  transform: scale(1.08);
  border-color: rgba(255, 152, 0, 0.6);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.25);
}
.voice-trigger-btn:active {
  transform: scale(0.95);
}

.voice-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 152, 0, 0.4);
  animation: voice-pulse 2s infinite cubic-bezier(0.25, 0, 0, 1);
  pointer-events: none;
}

@keyframes voice-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Contenedor del portal galáctico */
.galaxy-portal-container {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: black;
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.4), inset 0 0 30px rgba(143, 139, 248, 0.5);
  overflow: hidden;
  animation: portal-bounce 4s ease-in-out infinite alternate;
}

@keyframes portal-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.galaxy-core {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffd54f 50%, #ff9800 100%);
  box-shadow: 0 0 30px #ffffff, 0 0 50px #ff9800;
  z-index: 5;
}

.galaxy-spiral-1, .galaxy-spiral-2 {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.85;
}

.galaxy-spiral-1 {
  background: conic-gradient(from 0deg, transparent 20%, #3b82f6 40%, #8f8bf8 60%, transparent 80%);
  animation: rotate-spiral 4s linear infinite;
  mix-blend-mode: screen;
}

.galaxy-spiral-2 {
  background: conic-gradient(from 180deg, transparent 20%, #00e676 40%, #ff9800 60%, transparent 80%);
  animation: rotate-spiral-reverse 6s linear infinite;
  mix-blend-mode: screen;
}

.galaxy-orbital {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: rotate-spiral 10s linear infinite;
}

@keyframes rotate-spiral {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotate-spiral-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Modulación del portal al detectar sonido */
.galaxy-portal-container.listening {
  animation: portal-listen 0.6s infinite alternate;
  box-shadow: 0 0 60px rgba(0, 230, 118, 0.6), inset 0 0 40px rgba(0, 230, 118, 0.4);
}

@keyframes portal-listen {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.galaxy-portal-container.speaking {
  animation: portal-speak 0.4s infinite alternate;
  box-shadow: 0 0 60px rgba(255, 152, 0, 0.6), inset 0 0 40px rgba(255, 152, 0, 0.4);
}

@keyframes portal-speak {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* ==========================================================================
   FLOATING DRAGGABLE VOICE WIDGET STYLES (v89)
   ========================================================================== */

.floating-voice-widget {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 68px;
  height: 68px;
  z-index: 9999;
  cursor: grab;
  user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  /* Hardware acceleration to stabilize rendering on iOS Safari */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.floating-voice-widget:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.voice-widget-glass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 15, 20, 0.9) 0%, rgba(5, 5, 8, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(255, 152, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Fix iOS Safari overflow-radius clipping bug */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* Reflective border overlay */
.voice-widget-glass::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
}

.voice-widget-spiral-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin-clockwise 8s linear infinite;
}

@keyframes spin-clockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.voice-widget-spiral-svg {
  width: 90%;
  height: 90%;
  opacity: 0.85;
}

.voice-widget-logo-container {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
}

.voice-widget-logo {
  width: 85%;
  height: 85%;
  object-fit: contain;
  border-radius: 50%;
}

/* Close/Hide button */
#voice-widget-hide-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(30, 30, 35, 0.9);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.floating-voice-widget:hover #voice-widget-hide-btn {
  opacity: 1;
}

#voice-widget-hide-btn:hover {
  background: #ff5252;
  color: white;
  transform: scale(1.1);
}

/* Restore pull tab handle */
#voice-widget-restore-tab {
  position: fixed;
  right: 0;
  bottom: 120px;
  width: 24px;
  height: 48px;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(135deg, rgba(255,152,0,0.85) 0%, rgba(255,87,34,0.9) 100%);
  border-left: 1px solid rgba(255,255,255,0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  font-size: 0.85rem;
  box-shadow: -2px 4px 10px rgba(255, 87, 34, 0.3);
  transition: transform 0.2s, width 0.2s;
}

#voice-widget-restore-tab:hover {
  transform: translateX(-4px);
  width: 28px;
}

.restore-tab-ping {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px 0 0 24px;
  border: 1px solid rgba(255,152,0,0.6);
  animation: tab-ping 2s infinite;
  pointer-events: none;
}

@keyframes tab-ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* PWA v92: Subtype toggle bar for Delivery / Mensajeria */
.subtype-toggle-bar {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
}

.subtype-toggle-bar .glass-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
}

.subtype-toggle-bar .glass-btn.active {
  background: var(--text-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transform: scale(1.02);
}

/* PWA v93: Product Catalog Styles */
.catalog-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.25s ease;
}
.catalog-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.catalog-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding-right: 10px;
}
.catalog-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}
.catalog-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.catalog-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-green);
  font-family: 'Outfit', sans-serif;
  margin-top: 2px;
}
.catalog-item-action {
  display: flex;
  align-items: center;
}

/* Quantity Selector Widget */
.catalog-qty-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2px 4px;
}
.catalog-qty-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s;
}
.catalog-qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.catalog-qty-val {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 14px;
  text-align: center;
  color: #fff;
}

/* Catalog Product Item row inside Profile settings */
.profile-catalog-item-node {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
}

/* Checkout Item Row */
.checkout-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
.checkout-item-row:last-child {
  border-bottom: none;
}

/* Premium Selectable Driver Cards in Checkout (v93) */
.checkout-driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.checkout-driver-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.checkout-driver-card.selected {
  background: rgba(0, 230, 118, 0.04) !important;
  border-color: rgba(0, 230, 118, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.1);
}
.checkout-driver-card.selected::after {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent-green);
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.05rem;
}
.checkout-driver-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glass);
}
.checkout-driver-card.selected .checkout-driver-avatar {
  border-color: var(--accent-green);
}
.checkout-driver-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.checkout-driver-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  font-family: 'Outfit', sans-serif;
}
.checkout-driver-meta {
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.checkout-driver-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 16px;
}
.checkout-driver-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-green);
  font-family: 'Outfit', sans-serif;
}
.checkout-driver-eta {
  font-size: 0.68rem;
  color: var(--text-secondary);
}




