/* ==========================================================================
   @paolau_fit - AntiGravity Floating UI Design System
   Paleta Neutra & Diseño Unisex Optimizado para PC, iOS, Android y Linux
   ========================================================================== */

:root {
  /* Paleta Neutra Premium (Unisex) */
  --bg-primary: #0c0e12;
  --bg-surface: #14171f;
  --bg-surface-elevated: #1a1e29;
  --bg-surface-card: rgba(26, 30, 41, 0.75);
  --bg-surface-glass: rgba(22, 25, 34, 0.85);
  --bg-overlay: rgba(12, 14, 18, 0.8);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-highlight: rgba(255, 255, 255, 0.28);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  
  /* Acentos Funcionales Neutros y Metálicos */
  --accent-titanium: #cbd5e1;
  --accent-action: #38bdf8;
  --accent-action-glow: rgba(56, 189, 248, 0.25);
  --accent-emerald: #34d399;
  --accent-emerald-glow: rgba(52, 211, 153, 0.25);
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  
  /* Sombras Flotantes AntiGravity */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.45);
  --shadow-floating: 0 20px 40px -6px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px var(--accent-action-glow);

  /* Curvaturas & Espaciado */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Dispositivo y Safe Areas para iOS/Android */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max-width: 1280px;
}

/* Modo Claro Neutro Opcional */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-card: rgba(255, 255, 255, 0.85);
  --bg-surface-glass: rgba(255, 255, 255, 0.9);
  --bg-overlay: rgba(15, 23, 42, 0.6);
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-highlight: rgba(0, 0, 0, 0.22);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.12);
  --shadow-floating: 0 20px 40px -6px rgba(0, 0, 0, 0.12), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #171c26 0%, var(--bg-primary) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  padding-bottom: calc(75px + var(--safe-bottom));
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 30px;
  }
}

/* Canvas de Confeti Global */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* Tipografía */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

p, span, label {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Header Flotante AntiGravity */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-surface-glass);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(12px + var(--safe-top)) 20px 12px 20px;
  transition: var(--transition-normal);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2a3142, #141720);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  border-radius: inherit;
  position: relative;
  z-index: 1;
}

.brand-logo-badge::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  animation: shine 6s infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  20%, 100% { transform: translateX(100%); }
}

.brand-details h1 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-creator {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--accent-titanium);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Reloj de Internet y Controles del Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.internet-clock-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.clock-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.clock-display {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.clock-time {
  font-family: "SF Mono", "Roboto Mono", Menlo, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.clock-source {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clock-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.clock-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Barra de Navegación Flotante (AntiGravity Tabs) */
.floating-nav {
  position: fixed;
  bottom: calc(12px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: calc(100% - 32px);
  max-width: 680px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 6px;
  box-shadow: var(--shadow-floating);
  display: flex;
  align-items: center;
  justify-content: space-around;
  transition: var(--transition-normal);
}

@media (min-width: 1024px) {
  .floating-nav {
    position: static;
    transform: none;
    max-width: var(--max-width);
    margin: 16px auto 0 auto;
    border-radius: var(--radius-lg);
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  position: relative;
}

@media (min-width: 1024px) {
  .nav-item {
    flex-direction: row;
    font-size: 0.85rem;
    gap: 8px;
    padding: 10px 18px;
  }
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.nav-item.active svg {
  stroke: var(--accent-action);
}

/* Contenedor Principal */
.main-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 40px 16px;
  width: 100%;
}

/* Secciones de Contenido */
.tab-content {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

.tab-content.active {
  display: block;
}

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

/* Tarjetas Flotantes Base */
.card-floating {
  background: var(--bg-surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card-floating:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.card-floating::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-action);
}

.card-title {
  font-size: 1.15rem;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   1. Cuestionario de Onboarding & Perfil Clínico
   ========================================================================== */
.onboarding-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .onboarding-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.form-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-action);
  box-shadow: 0 0 0 3px var(--accent-action-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Opciones de Objetivos (Chips seleccionables) */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.chip-option {
  cursor: pointer;
  position: relative;
}

.chip-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  user-select: none;
}

.chip-option input:checked + .chip-label {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-action);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Perfil Ocupacional Cards */
.occupational-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.occupational-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.occupational-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.occupational-card.selected {
  border-color: var(--accent-action);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 1px var(--accent-action);
}

.occ-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.occ-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.occ-focus-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--accent-titanium);
  display: inline-block;
}

/* Alertas de Historial Clínico */
.clinical-alert-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.clinical-alert-box.info {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.clinical-alert-text {
  font-size: 0.84rem;
  color: var(--text-primary);
}

/* Botones Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent {
  background: var(--accent-action);
  color: #0c0e12;
}

.btn-accent:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ==========================================================================
   2. Muro Fotográfico Corporal (4 Fotos Antes & Después)
   ========================================================================== */
.photo-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.photo-slot-card {
  background: var(--bg-surface);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.photo-slot-card:hover {
  border-color: var(--accent-action);
  background: rgba(56, 189, 248, 0.04);
}

.photo-slot-card.has-photo {
  border-style: solid;
  border-color: var(--border-subtle);
  padding: 0;
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-slot-card.has-photo .photo-preview-img {
  display: block;
}

.photo-slot-card.has-photo .photo-placeholder-content {
  display: none;
}

.photo-placeholder-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.photo-angle-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  z-index: 10;
}

.photo-action-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.photo-slot-card:hover .photo-action-overlay {
  opacity: 1;
}

.photo-file-input {
  display: none;
}

/* Comparador Interactivo Antes y Después */
.before-after-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 20px auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  user-select: none;
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-image.before-img {
  width: 50%;
  border-right: 2px solid #ffffff;
  overflow: hidden;
  z-index: 2;
}

.ba-image.before-img img {
  width: 600px;
  height: 400px;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.ba-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0e12;
  font-size: 0.8rem;
  font-weight: bold;
}

.ba-tag {
  position: absolute;
  top: 16px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  z-index: 15;
}

.ba-tag.before { left: 16px; }
.ba-tag.after { right: 16px; }

/* ==========================================================================
   3. Dashboard & Metas (Pasos, Confeti, Alarmas, Reloj)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* Contador de Pasos y Milla */
.step-counter-widget {
  background: linear-gradient(135deg, rgba(26, 30, 41, 0.9), rgba(18, 21, 30, 0.9));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.step-counter-widget::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--accent-action-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.steps-circle-container {
  width: 180px;
  height: 180px;
  margin: 16px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.steps-svg-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
  fill: none;
}

.steps-svg-progress {
  stroke: var(--accent-action);
  stroke-width: 10;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 471;
  stroke-dashoffset: 471;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.steps-inner-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.steps-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.steps-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.step-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.step-actions-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Banner de Celebración de 1 Milla */
.mile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-full);
  color: var(--accent-amber);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 12px;
}

/* Metas de Tiempo (Diaria, Semanal, Mensual, Anual) */
.goals-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.goal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.goal-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.goal-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition-fast);
}

.goal-item:hover {
  border-color: var(--border-medium);
}

.goal-info {
  flex: 1;
}

.goal-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.goal-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-action), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.goal-check-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  color: transparent;
}

.goal-check-btn.completed {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #0c0e12;
}

/* Alarmas y Recordatorios Inteligentes (Hidratación & Dieta) */
.alarms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.alarm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alarm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.water-glasses-row {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin: 8px 0;
}

.water-glass-icon {
  width: 28px;
  height: 38px;
  border-radius: 4px 4px 8px 8px;
  border: 1.5px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.water-glass-icon.filled {
  background: rgba(56, 189, 248, 0.85);
  border-color: var(--accent-action);
  box-shadow: 0 0 10px var(--accent-action-glow);
}

/* ==========================================================================
   4. Rutinas de Entrenamiento
   ========================================================================== */
.routines-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.routine-filter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.routine-filter-chip.active, .routine-filter-chip:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-action);
  color: var(--text-primary);
}

.routines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.routine-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.routine-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.routine-meta-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.routine-pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Temporizador de Ejercicio Interactivo */
.workout-timer-widget {
  background: linear-gradient(135deg, #181d28, #10131a);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  box-shadow: var(--shadow-floating);
}

.timer-digits {
  font-family: "SF Mono", "Roboto Mono", Menlo, monospace;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 12px 0;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   5. Nutrición & Dietas (100% Editable)
   ========================================================================== */
.nutrition-header-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.macro-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.macro-box .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.macro-box .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meal-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.meal-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meal-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}

.meal-item-row .del-btn {
  color: var(--accent-rose);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

/* ==========================================================================
   6. Salón de Acondicionamiento de Paola & Tienda Virtual
   ========================================================================== */
.salon-hero-banner {
  background: linear-gradient(135deg, rgba(12, 14, 18, 0.88) 0%, rgba(20, 24, 34, 0.82) 100%),
              url('../images/products/gym1.jpg') center/cover no-repeat;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 44px 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: var(--shadow-floating);
}

.salon-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.salon-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-titanium);
  margin-bottom: 16px;
}

.salon-hero-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.salon-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.salon-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.salon-feature-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-action);
  flex-shrink: 0;
}

/* Tienda Virtual */
.store-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
}

.product-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-image-container {
  height: 220px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, rgba(18, 21, 30, 0.95) 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

.product-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Modal y Popups */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-floating);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Notificación Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

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