/* ========================================================
   GUOX GYM - ULTRA PREMIUM DARK FITNESS THEME
   Obsidian, Emerald Glow, Cyber Cyan & Violet PRs
   ======================================================== */

:root {
  --bg-main: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-input: #FFFFFF;
  --border-color: #E2E8F0;
  --border-focus: #10B981;
  
  --primary: #10B981;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-dark: #059669;
  
  --cyan: #06B6D4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  
  --purple: #8B5CF6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  
  --amber: #F59E0B;
  --amber-glow: rgba(245, 158, 11, 0.25);
  
  --rose: #F43F5E;
  --rose-glow: rgba(244, 63, 94, 0.25);
  
  --text-main: #000000;
  --text-muted: #111827;
  --text-dim: #374151;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #1F2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease;
}

.brand-section {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 22px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-info h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #0F172A, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-block;
  margin-top: 3px;
}

.nav-menu {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  font-weight: 700;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: #F1F5F9;
  transform: translateX(3px);
}

.nav-item.active {
  color: #000000;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.nav-item.active i {
  color: var(--primary);
}

/* User footer in sidebar */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: #F8FAFC;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #374151, #1F2937);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}
.role-admin { background: rgba(244, 63, 94, 0.2); color: #FB7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.role-trainer { background: rgba(139, 92, 246, 0.2); color: #C084FC; border: 1px solid rgba(139, 92, 246, 0.3); }
.role-athlete { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
  position: relative;
}

/* Topbar */
.topbar {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

.page-title-box h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-title-box p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-switcher-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}
.role-switcher-box select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  outline: none;
  cursor: pointer;
}
.role-switcher-box select option {
  background: #FFFFFF;
  color: var(--text-main);
}

/* Page Container */
.page-content {
  padding: 32px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Glass Containers */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000000;
}

.card-title i {
  color: var(--primary);
}

/* Grid Layouts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--primary); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.3); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-icon.rose { background: rgba(244, 63, 94, 0.15); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.3); }

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: #000000;
  margin: 4px 0 2px;
}

.stat-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Two Columns & Dashboard sections */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

/* Progress Bars */
.progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: #F1F5F9;
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-emerald { background: linear-gradient(90deg, #10B981, #34D399); }
.bg-cyan { background: linear-gradient(90deg, #06B6D4, #38BDF8); }
.bg-purple { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.bg-amber { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #000;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: #F1F5F9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--cyan) 0%, #0284C7 100%);
  color: #000;
  box-shadow: 0 4px 14px var(--cyan-glow);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Inputs & Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

select.form-control option {
  background: #FFFFFF;
  color: var(--text-main);
}

/* Exercises Catalog */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  align-items: center;
}

.search-box {
  flex: 2;
  min-width: 240px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  padding-left: 40px;
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.exercise-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.exercise-thumb {
  height: 190px;
  background: #0B0F19;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exercise-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.exercise-card:hover .exercise-thumb img {
  transform: scale(1.05);
}

.exercise-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.exercise-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #000000;
}

.exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 600;
}
.tag-primary { background: rgba(16, 185, 129, 0.15); color: var(--primary); }
.tag-cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.tag-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }

/* Diet Meal Log Section */
.meal-block {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  padding: 16px;
}

.meal-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meal-block-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.food-macros-badge {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.food-macros-badge span b {
  color: var(--text-main);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text-main); }

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Table styles */
.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 14px;
  font-size: 0.88rem;
  color: #000000;
  border-bottom: 1px solid var(--border-color);
}

.custom-table tr:hover td {
  background: #F8FAFC;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pagination button {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-2col, .grid-3col {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   LANDING PAGE & AUTHENTICATION (salud.guox.mx)
   ======================================================== */

.view-container {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.view-container.active {
  display: block;
}

#view-app.active {
  display: flex;
}

#view-test.active {
  display: block;
}

/* Landing Navbar */
.landing-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.landing-brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 22px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.landing-brand-text h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.landing-brand-text span {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.landing-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.landing-nav-link:hover {
  color: var(--primary);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hero Section */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 24px 40px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  max-width: 900px;
  margin: 0 auto 20px;
  color: #000000;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Metrics stats banner */
.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 50px;
}

.landing-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.landing-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.landing-stat-lbl {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Auth Card Box */
.auth-wrapper {
  max-width: 480px;
  margin: 0 auto 70px;
}

.auth-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--purple));
}

.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: rgba(16, 185, 129, 0.18);
  color: var(--text-main);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.auth-form-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.auth-form-pane.active {
  display: block;
}

.quick-admin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.2s ease;
}
.quick-admin-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #F59E0B;
}

/* Features Grid */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 30px;
  transition: all 0.25s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.feature-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Toast alert */
.toast-alert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  animation: slideUp 0.3s ease;
}
.toast-success { border-color: #10B981; color: #065F46; }
.toast-error { border-color: #F43F5E; color: #9F1239; }
.toast-alert.hide { opacity: 0; transform: translateY(10px); transition: all 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Landing footer */
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .landing-nav-links { display: none; }
  .landing-navbar { padding: 14px 20px; }
  .hero-title { font-size: 2.2rem; }
  .landing-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================================================
   ONBOARDING DIAGNOSTIC WIZARD & SOMATOTYPE CARDS
   ======================================================== */
.wizard-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}
.wizard-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  position: relative;
}
.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  cursor: pointer;
}
.wizard-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--border-color);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.wizard-step-item.active .wizard-step-circle {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--text-main);
  box-shadow: 0 0 15px var(--primary-glow);
}
.wizard-step-item.completed .wizard-step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #000;
}
.wizard-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wizard-step-item.active .wizard-step-label {
  color: var(--primary);
}

.wizard-body-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}
.wizard-body-pane.active {
  display: block;
}

/* Somatotype selection cards */
.somatotype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.somatotype-card {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.somatotype-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-3px);
  background: rgba(16, 185, 129, 0.05);
}
.somatotype-card.selected {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}
.somatotype-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.somatotype-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.somatotype-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.somatotype-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: #F1F5F9;
  color: var(--text-dim);
  margin-top: 10px;
}

/* Choice pill radio / button */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 20px;
}
.choice-pill {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.choice-pill:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.05);
}
.choice-pill.selected {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}
.choice-pill-icon {
  font-size: 1.4rem;
  color: var(--cyan);
}
.choice-pill-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}
.choice-pill-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Prescription summary box in step 5 */
.prescription-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.presc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.presc-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.presc-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
}
.presc-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ========================================================
   DIET SUBNAV, WEEKLY CALENDAR & SHOPPING LIST
   ======================================================== */
.diet-subnav {
  display: flex;
  gap: 8px;
  background: #F8FAFC;
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
}
.diet-subnav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.diet-subnav-btn:hover {
  color: var(--text-main);
  background: #F1F5F9;
}
.diet-subnav-btn.active {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.diet-subpane {
  display: none;
  animation: fadeIn 0.25s ease;
}
.diet-subpane.active {
  display: block;
}

/* Week selector bar */
.week-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.week-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.week-pill-btn {
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.week-pill-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}
.week-pill-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

/* Weekly calendar 7-days grid */
.weekly-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
.day-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.day-card-header {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.day-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-card-meta {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.day-card-meals {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.meal-suggest-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all 0.2s ease;
}
.meal-suggest-item:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}
.meal-suggest-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.meal-type-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.meal-suggest-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
}
.meal-suggest-ingredients {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}
.meal-suggest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
}
.meal-macros-pill {
  font-size: 0.74rem;
  color: var(--text-dim);
}
.meal-macros-pill b {
  color: var(--text-main);
}
.day-card-footer {
  padding: 12px 16px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Shopping list styling */
.shopping-list-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.shopping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.shopping-cat-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.shopping-cat-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.shopping-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shopping-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  cursor: pointer;
}
.shopping-item-row:hover {
  background: #F1F5F9;
}
.shopping-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-main);
}
.shopping-item-row.checked .shopping-item-left span {
  text-decoration: line-through;
  color: var(--text-dim);
}
.shopping-item-qty {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}
.shopping-custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.shopping-item-row.checked .shopping-custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

/* ========================================================
   11. SEGUIMIENTO DE CUMPLIMIENTO DE DIETA & COMIDAS EXTRAS
   ======================================================== */
.day-compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-status-completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10B981;
  color: #065F46;
}
.badge-status-partial {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #F59E0B;
  color: #92400E;
}
.badge-status-skipped {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #991B1B;
}
.badge-status-pending {
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  color: #374151;
}

.meal-suggest-item.is-eaten {
  border: 2px solid #10B981;
  background: rgba(16, 185, 129, 0.04);
}
.meal-suggest-item.is-skipped {
  border: 2px dashed #EF4444;
  background: rgba(239, 68, 68, 0.03);
  opacity: 0.8;
}
.meal-suggest-item.is-skipped .meal-suggest-name {
  text-decoration: line-through;
  color: #64748B;
}

.btn-meal-check {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #000000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-meal-check:hover {
  background: #10B981;
  color: #000000;
}

.btn-meal-skip {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #000000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-meal-skip:hover {
  background: #EF4444;
  color: #000000;
}

.meal-logged-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}
.pill-eaten {
  background: rgba(16, 185, 129, 0.18);
  color: #000000;
  border: 1px solid #10B981;
}
.pill-skipped {
  background: rgba(239, 68, 68, 0.15);
  color: #000000;
  border: 1px solid #EF4444;
}

.day-extras-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
}
.day-extras-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 6px;
}
.extra-food-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 5px;
  font-size: 0.8rem;
  color: #000000;
}
.extra-food-delete {
  background: transparent;
  border: none;
  color: #EF4444;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.9rem;
}

/* ========================================================
   12. EQUIPAMIENTO (CASA / GYM), RUTINAS INTELIGENTES & CALENDARIO INTEGRAL
   ======================================================== */
.equipment-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.equipment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #000000;
  transition: all 0.2s ease;
  user-select: none;
}
.equipment-chip:hover {
  border-color: var(--primary);
  background: #F0FDF4;
}
.equipment-chip input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Grid de Rutinas Semanales */
.workout-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}
.workout-day-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.workout-day-header {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.workout-day-title {
  font-size: 1rem;
  font-weight: 800;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.workout-day-exercises {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.workout-exercise-item {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  transition: all 0.2s ease;
}
.workout-exercise-item:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}
.workout-exercise-item.is-done {
  background: rgba(16, 185, 129, 0.05);
  border-left: 4px solid #10B981;
}
.workout-exercise-item.is-skipped {
  background: rgba(239, 68, 68, 0.04);
  border-left: 4px dashed #EF4444;
  opacity: 0.8;
}
.workout-exercise-item.is-skipped .workout-ex-title {
  text-decoration: line-through;
  color: #64748B;
}
.workout-ex-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #F1F5F9;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  flex-shrink: 0;
}
.workout-ex-info {
  flex: 1;
  min-width: 0;
}
.workout-ex-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #000000;
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workout-ex-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.workout-ex-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.workout-day-footer {
  padding: 12px 16px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Calendario Integral de Hábitos */
.habit-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.habit-weekday-header {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #000000;
  text-transform: uppercase;
  padding-bottom: 8px;
  letter-spacing: 0.5px;
}
.habit-day-cell {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.habit-day-cell:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.habit-day-cell.is-today {
  border: 2px solid var(--primary);
}
.habit-day-cell.is-perfect {
  background: rgba(16, 185, 129, 0.08);
  border: 2px solid #10B981;
}
.habit-day-cell.is-other-month {
  opacity: 0.35;
  background: #F1F5F9;
  cursor: default;
}
.habit-day-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.habit-cell-badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.habit-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}
.badge-wo-done {
  background: rgba(16, 185, 129, 0.2);
  color: #065F46;
  border: 1px solid #10B981;
}
.badge-wo-partial {
  background: rgba(245, 158, 11, 0.2);
  color: #92400E;
  border: 1px solid #F59E0B;
}
.badge-wo-skipped {
  background: rgba(239, 68, 68, 0.15);
  color: #991B1B;
  border: 1px solid #EF4444;
}
.badge-wo-rest {
  background: #E2E8F0;
  color: #334155;
  border: 1px solid #CBD5E1;
}
.badge-diet-done {
  background: rgba(16, 185, 129, 0.2);
  color: #065F46;
  border: 1px solid #10B981;
}
.badge-diet-partial {
  background: rgba(245, 158, 11, 0.2);
  color: #92400E;
  border: 1px solid #F59E0B;
}
.badge-diet-skipped {
  background: rgba(239, 68, 68, 0.15);
  color: #991B1B;
  border: 1px solid #EF4444;
}
.badge-pending {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .habit-calendar-grid {
    gap: 4px;
  }
  .habit-day-cell {
    min-height: 75px;
    padding: 4px;
  }
  .habit-badge {
    font-size: 0.6rem;
    padding: 2px 4px;
  }
}

/* ========================================================
   13. SELECTOR DE LUGAR DE ENTRENAMIENTO (CASA, GYM O AMBOS)
   ======================================================== */
.training-place-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.place-toggle-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.place-toggle-card:hover {
  border-color: #64748B;
  background: #F8FAFC;
  transform: translateY(-1px);
}
.place-toggle-card.is-selected {
  border-color: #10B981;
  background: #F0FDF4;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}
.place-toggle-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.place-toggle-content {
  flex: 1;
  min-width: 0;
}
.place-toggle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.place-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.place-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #000000;
}
.place-desc {
  font-size: 0.78rem;
  color: #374151;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.place-toggle-indicator {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.85rem;
  font-weight: 900;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.place-toggle-card.is-selected .place-toggle-indicator {
  border-color: #10B981;
  background: #10B981;
  color: #FFFFFF;
}

