/* CSS variables for a premium Verde & Nero look */
:root {
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --primary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --info: #06B6D4;
  --info-glow: rgba(6, 182, 212, 0.15);
  --warning: #F59E0B;
  --warning-glow: rgba(245, 158, 11, 0.15);
  --danger: #EF4444;
  --danger-hover: #DC2626;
  
  /* Unified Global Button System Tokens */
  --btn-bg: #10B981;
  --btn-bg-hover: #059669;
  --btn-bg-active: #047857;
  --btn-text: #061A14;
  --btn-border: transparent;
  --btn-radius: 12px;
  --btn-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  --btn-shadow-hover: 0 6px 20px rgba(16, 185, 129, 0.38);
  
  /* Dark Theme Colors (DEFAULT for WOW factor) */
  --bg: #000000;
  --bg-gradient: radial-gradient(circle at top, #111827 0%, #000000 100%);
  --card-bg: #0B0F19;
  --card-border: #1E293B;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --input-bg: #000000;
  --input-border: #334155;
  --header-bg: rgba(11, 15, 25, 0.8);
  --sidebar-bg: #05070B;
  --sidebar-text: #64748B;
  --sidebar-active: #FFFFFF;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Light Theme Colors (Toggleable) */
body.light-theme {
  --btn-bg: #10B981;
  --btn-bg-hover: #059669;
  --btn-bg-active: #047857;
  --btn-text: #061A14;
  --btn-border: transparent;
  --btn-radius: 12px;
  --btn-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  --btn-shadow-hover: 0 6px 20px rgba(16, 185, 129, 0.3);
  --bg: #F8FAFC;
  --bg-gradient: radial-gradient(circle at top, #FFFFFF 0%, #F1F5F9 100%);
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;
  --text: #0F172A;
  --text-muted: #64748B;
  --input-bg: #FFFFFF;
  --input-border: #CBD5E1;
  --header-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Reset and Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, .btn, .brand-title, .nav-item, .points-val, .badge {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* ============================================================
   GLOBAL UNIFIED BUTTON SYSTEM
   (Emerald green background, dark foreground font, uniform look)
   ============================================================ */
button:not(.nav-item):not(.theme-toggle):not(.modal-close-btn):not(.pwa-close):not(.wa-send-circle-btn):not(.wa-header-btn):not(.wa-input-action-btn):not(#wa-cancel-attachment):not(.tab-btn):not(.auth-tab-btn):not(.chip):not(.progress-subnav-btn):not(.profile-subnav-btn):not(.subnav-btn):not(.day-chip):not(.day-btn):not(.header-account-pill),
.btn,
.btn-primary,
.btn-primary-glow,
.btn-secondary,
.submit-btn,
.save-weight-btn,
.save-metrics-btn,
.water-btn,
.chat-send-btn,
.reset-maratona-btn,
.pwa-btn,
.view-recipe-btn,
.coach-product-buy-btn,
.meal-product-buy-btn,
.save-profile-btn,
.btn-view-ai-scan {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  letter-spacing: 0.2px;
  border: 1px solid var(--btn-border) !important;
  border-radius: var(--btn-radius) !important;
  padding: 10px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none !important;
  box-shadow: var(--btn-shadow) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
}

button:not(.nav-item):not(.theme-toggle):not(.modal-close-btn):not(.pwa-close):not(.wa-send-circle-btn):not(.wa-header-btn):not(.wa-input-action-btn):not(#wa-cancel-attachment):not(.tab-btn):not(.auth-tab-btn):not(.chip):not(.progress-subnav-btn):not(.profile-subnav-btn):not(.subnav-btn):not(.day-chip):not(.day-btn):not(.header-account-pill):hover,
.btn:hover,
.btn-primary:hover,
.btn-primary-glow:hover,
.btn-secondary:hover,
.submit-btn:hover,
.save-weight-btn:hover,
.save-metrics-btn:hover,
.water-btn:hover,
.chat-send-btn:hover,
.reset-maratona-btn:hover,
.pwa-btn:hover,
.view-recipe-btn:hover,
.coach-product-buy-btn:hover,
.meal-product-buy-btn:hover,
.save-profile-btn:hover,
.btn-view-ai-scan:hover {
  background: var(--btn-bg-hover) !important;
  color: var(--btn-text) !important;
  box-shadow: var(--btn-shadow-hover) !important;
  transform: translateY(-1px);
}

button:not(.nav-item):not(.theme-toggle):not(.modal-close-btn):not(.pwa-close):not(.wa-send-circle-btn):not(.wa-header-btn):not(.wa-input-action-btn):not(#wa-cancel-attachment):not(.tab-btn):not(.auth-tab-btn):not(.chip):not(.progress-subnav-btn):not(.profile-subnav-btn):not(.subnav-btn):not(.day-chip):not(.day-btn):not(.header-account-pill):active,
.btn:active,
.btn-primary:active,
.btn-primary-glow:active,
.btn-secondary:active,
.submit-btn:active,
.save-weight-btn:active,
.save-metrics-btn:active,
.water-btn:active,
.chat-send-btn:active,
.reset-maratona-btn:active,
.pwa-btn:active,
.view-recipe-btn:active,
.coach-product-buy-btn:active,
.meal-product-buy-btn:active,
.save-profile-btn:active,
.btn-view-ai-scan:active {
  background: var(--btn-bg-active) !important;
  transform: translateY(0);
}

/* ============================================================
   GLOBAL UNIFIED TAB & SEGMENTED CONTROL SYSTEM
   (Dedicated capsule box container + sleek differentiated tabs)
   ============================================================ */
.tabs-bar-container,
.profile-subnav,
.filter-categories,
.progress-subnav-container,
.auth-tab-group,
#auth-tabs-container {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 16px !important;
  padding: 6px !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.12) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-sizing: border-box !important;
}

.tabs-bar-container::-webkit-scrollbar,
.profile-subnav::-webkit-scrollbar,
.filter-categories::-webkit-scrollbar,
.progress-subnav-container::-webkit-scrollbar,
.auth-tab-group::-webkit-scrollbar,
#auth-tabs-container::-webkit-scrollbar {
  display: none !important;
}

body.light-theme .tabs-bar-container,
body.light-theme .profile-subnav,
body.light-theme .filter-categories,
body.light-theme .progress-subnav-container,
body.light-theme .auth-tab-group,
body.light-theme #auth-tabs-container {
  background: #EEF2F6 !important;
  border-color: #CBD5E1 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* Inactive Tab Item */
.tab-btn,
.profile-subnav-btn,
.progress-subnav-btn,
.auth-tab-btn {
  background: transparent !important;
  color: #94A3B8 !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  padding: 9px 18px !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1px;
  cursor: pointer !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  outline: none !important;
  flex: none;
}

body.light-theme .tab-btn,
body.light-theme .profile-subnav-btn,
body.light-theme .progress-subnav-btn,
body.light-theme .auth-tab-btn {
  color: #64748B !important;
}

/* Inactive Tab Hover */
.tab-btn:hover:not(.active),
.profile-subnav-btn:hover:not(.active),
.progress-subnav-btn:hover:not(.active),
.auth-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  transform: none !important;
}

body.light-theme .tab-btn:hover:not(.active),
body.light-theme .profile-subnav-btn:hover:not(.active),
body.light-theme .progress-subnav-btn:hover:not(.active),
body.light-theme .auth-tab-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0F172A !important;
  border-color: transparent !important;
}

/* Active Tab Item (Distinct Elevated Capsule) */
.tab-btn.active,
.profile-subnav-btn.active,
.progress-subnav-btn.active,
.auth-tab-btn.active {
  background: #10B981 !important;
  color: #061A14 !important;
  font-weight: 800 !important;
  border: 1px solid #10B981 !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
}

body.light-theme .tab-btn.active,
body.light-theme .profile-subnav-btn.active,
body.light-theme .progress-subnav-btn.active,
body.light-theme .auth-tab-btn.active {
  background: #10B981 !important;
  color: #061A14 !important;
  border-color: #059669 !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--input-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography Utility */
.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary);
}
.text-success {
  color: var(--success);
}
.text-info {
  color: var(--info);
}

/* App Layout Grid */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styling (Desktop) */
.sidebar {
  background: var(--sidebar-bg);
  color: #FFFFFF;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
  border-right: 1px solid var(--card-border);
  box-shadow: 10px 0 30px rgba(0,0,0,0.3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-nav .nav-item {
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  text-align: left;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.25s ease;
}

.sidebar-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.sidebar-nav .nav-item.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

body.light-theme .sidebar-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.sidebar-logout-btn,
#sidebar-logout-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 16px !important;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  border: 1px solid #EF4444 !important;
  border-radius: 12px !important;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
}

.sidebar-logout-btn:hover,
#sidebar-logout-btn:hover {
  background: linear-gradient(135deg, #F87171 0%, #EF4444 100%) !important;
  color: #FFFFFF !important;
  border-color: #FCA5A5 !important;
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55) !important;
}

.sidebar-logout-btn:active,
#sidebar-logout-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

.sidebar-logout-btn .logout-icon {
  font-size: 16px !important;
  color: #FFFFFF !important;
}

.sidebar-logout-btn span {
  color: #FFFFFF !important;
}

body.light-theme .sidebar-logout-btn,
body.light-theme #sidebar-logout-btn {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

body.light-theme .sidebar-logout-btn:hover,
body.light-theme #sidebar-logout-btn:hover {
  background: linear-gradient(135deg, #F87171 0%, #EF4444 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45) !important;
}

.herbalife-tag {
  font-size: 11px;
  color: var(--sidebar-text);
  display: block;
  text-align: center;
  font-style: italic;
}

/* Main Content styling */
.main-content {
  padding: 32px 4% 100px 4%; /* Bottom padding accounts for mobile nav */
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

/* App Header styling */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
}

.app-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-header p {
  font-size: 13px;
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Selector Dropdown */
.lang-selector-container {
  position: relative;
}

.lang-select-dropdown {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.lang-select-dropdown:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.active-badge {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 18px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.05);
  background: var(--bg);
}

/* Page visibility system */
.app-page {
  display: none;
  animation: pageFadeIn 0.4s ease forwards;
}

.app-page.active {
  display: block;
}

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

/* Day Selector Slider Styling */
.day-slider-container {
  margin-bottom: 28px;
}

.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.day-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
}

.day-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 74px;
  box-shadow: none;
  user-select: none;
}

.day-btn span:nth-child(2) {
  color: var(--text-primary);
  font-weight: 800;
  transition: color 0.25s ease;
}

.day-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.day-btn:hover span:nth-child(2) {
  color: var(--primary);
}

.day-btn.active {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  border-color: #10B981 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-2px) scale(1.03);
}

.day-btn.active span:nth-child(2) {
  color: var(--btn-text) !important;
  font-weight: 800;
}

/* Light Theme Overrides */
body.light-theme .day-btn {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748B;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.light-theme .day-btn span:nth-child(2) {
  color: #0F172A;
}

body.light-theme .day-btn:hover {
  background: #F0FDF4;
  border-color: #059669;
  color: #059669;
}

body.light-theme .day-btn:hover span:nth-child(2) {
  color: #059669;
}

body.light-theme .day-btn.active {
  background: #10B981 !important;
  color: #061A14 !important;
  border-color: #059669 !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3) !important;
}

body.light-theme .day-btn.active span:nth-child(2) {
  color: #061A14 !important;
}

.day-btn .day-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-block;
  transition: all 0.25s ease;
  margin-top: 2px;
}

body.light-theme .day-btn .day-status-dot {
  background: rgba(0, 0, 0, 0.15);
}

.day-btn.active .day-status-dot {
  background: #061A14 !important;
  box-shadow: 0 0 6px rgba(6, 26, 20, 0.6);
}

.day-btn.completed .day-status-dot {
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.day-btn.active.completed .day-status-dot {
  background: #061A14 !important;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.badge {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
}

/* Checklist items stylings */
.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checklist-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.check-item-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

body.light-theme .check-item-card {
  background: var(--bg);
}

.check-item-card:hover {
  border-color: var(--input-border);
  transform: translateX(2px);
}

.check-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.check-left-input {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

.check-inline-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.custom-select-small {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.custom-chk {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  border-radius: 6px;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.check-left label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s ease;
}

.custom-chk:checked + label .check-title {
  color: var(--text-muted);
  text-decoration: line-through;
}

.check-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.points-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Water tracker specialized dashboard */
.water-tracker-container {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
}

body.light-theme .water-tracker-container {
  background: var(--bg);
}

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

.water-status {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.water-cups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.glass-icon {
  width: 32px;
  height: 42px;
  background: transparent;
  border: 2px solid var(--input-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-block;
}

.glass-icon::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: var(--primary);
  transition: height 0.4s ease;
}

.glass-icon.filled {
  border-color: var(--primary);
  transform: scale(1.05);
}

.glass-icon.filled::before {
  height: 85%;
}

.water-controls {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.water-btn {
  flex: 1;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--btn-text);
  padding: 10px;
  border-radius: var(--btn-radius);
  font-weight: 800;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.water-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(-1px);
}

.water-btn.primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

/* Movement Logger dashboard component */
.movement-logger-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

body.light-theme .movement-logger-card {
  background: var(--bg);
}

.movement-row {
  display: flex;
  gap: 16px;
}

.input-unit-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.input-unit-group label {
  font-size: 12px;
  font-weight: 700;
}

.input-unit-group input, .input-unit-group select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  outline: none;
}

.save-metrics-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--btn-text);
  border-radius: var(--btn-radius);
  padding: 11px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.save-metrics-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(-1px);
}

/* Weight logger inputs */
.weight-logger {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.light-theme .weight-logger {
  background: var(--bg);
}

.weight-input-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.weight-input-container label {
  font-size: 14px;
  font-weight: 700;
}

.input-inline {
  display: flex;
  gap: 8px;
}

.input-inline input {
  width: 90px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  text-align: center;
}

.save-weight-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  padding: 8px 16px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.save-weight-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(-1px);
}

/* Side column tools */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Radial Score style */
.score-radial {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto;
}

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

.radial-bg {
  fill: none;
  stroke: var(--card-border);
  stroke-width: 8px;
}

.radial-progress {
  fill: none;
  stroke: url(#score-radial-gradient);
  stroke-width: 8px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.score-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#score-text {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.score-max {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.score-feedback {
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

/* Mini Stats dashboard element */
.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.mini-stat {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}

body.light-theme .mini-stat {
  background: var(--bg);
}

.mini-stat-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.mini-stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Tip card styles */
.tip-card {
  border-left: 4px solid var(--primary);
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tip-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.tip-body {
  font-size: 13px;
  line-height: 1.5;
}

/* PAGE: LEADERBOARD STYLING */
.leaderboard-intro {
  padding: 24px 30px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  color: #FFFFFF;
}

.card-gradient-green {
  background: linear-gradient(135deg, #059669 0%, #000000 100%);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.1);
}

.leaderboard-intro h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.leaderboard-intro p {
  font-size: 14px;
  opacity: 0.9;
  max-width: 600px;
}

.league-name {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.leaderboard-header-row {
  display: grid;
  grid-template-columns: 50px 1fr 120px 100px 80px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--card-border);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 50px 1fr 120px 100px 80px;
  padding: 16px;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
  transition: background 0.2s ease;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-row:hover {
  background: rgba(255,255,255,0.02);
}

body.light-theme .leaderboard-row:hover {
  background: var(--bg);
}

.leaderboard-row.user-row {
  background: var(--primary-glow);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}

.rank-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
}

.leaderboard-row:nth-child(1) .rank-val {
  color: #FBBF24; /* Gold */
}
.leaderboard-row:nth-child(2) .rank-val {
  color: #94A3B8; /* Silver */
}
.leaderboard-row:nth-child(3) .rank-val {
  color: #B45309; /* Bronze */
}

.avatar-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--input-border);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaderboard-row.user-row .row-avatar {
  background: var(--primary);
  color: #FFFFFF;
}

.loss-val {
  font-weight: 800;
}

.points-val-lb {
  font-weight: 600;
  color: var(--text-muted);
}

.leaderboard-row.user-row .points-val-lb {
  color: var(--primary);
  font-weight: 800;
}

.trend-indicator {
  font-size: 12px;
  font-weight: 700;
}

.trend-indicator.up {
  color: var(--success);
}

.trend-indicator.down {
  color: var(--danger);
}

.trend-indicator.stable {
  color: var(--text-muted);
}

/* PAGE: GRAPHICS AND ANALYTICS */
.chart-large-card {
  margin-bottom: 28px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  margin-top: 15px;
}

.svg-chart {
  width: 100%;
  height: 100%;
}

.chart-empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1px);
}

body.light-theme .chart-empty-state {
  background: rgba(255, 255, 255, 0.4);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.stats-detailed-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.detail-stat-val {
  display: block;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
}

.detail-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SVG Chart Elements Stylings */
.chart-grid-line {
  stroke: var(--card-border);
  stroke-width: 1px;
  stroke-dasharray: 4,4;
}

.chart-axis-text {
  fill: var(--text-muted);
  font-size: 8px;
  font-family: inherit;
}

.chart-path-weight {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3px;
  stroke-linecap: round;
}

.chart-area-weight {
  fill: url(#weight-gradient);
  opacity: 0.15;
}

.chart-dot-weight {
  fill: var(--primary);
  stroke: var(--card-bg);
  stroke-width: 2px;
}

.chart-bar-water {
  fill: var(--primary);
  rx: 3px;
  ry: 3px;
  transition: height 0.3s;
}

.chart-bar-water-bg {
  fill: var(--card-border);
  opacity: 0.3;
  rx: 3px;
  ry: 3px;
}

/* PAGE: COMMUNITY GRID & MESSAGES */
.community-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.community-channels-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.community-sidebar-title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 700;
}

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

.channel-item {
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.2s;
}

body.light-theme .channel-item {
  background: var(--bg);
}

.channel-item.active {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.channel-item-static {
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1px solid var(--card-border);
}

.chan-icon {
  font-size: 20px;
}

.chan-details {
  display: flex;
  flex-direction: column;
}

.chan-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.chan-subtext {
  font-size: 10px;
  color: var(--text-muted);
}

.community-chat-box {
  display: flex;
  flex-direction: column;
  height: 550px;
  padding: 0;
  overflow: hidden;
}

.community-chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
}

.community-chat-header h3 {
  font-size: 16px;
}

.chat-status {
  font-size: 11px;
  color: var(--text-muted);
}

.community-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(0,0,0,0.2);
}

body.light-theme .community-messages-container {
  background: #F1F5F9;
}

.community-message-card {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

.community-message-card.bot {
  align-self: flex-start;
}

.community-message-card.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-bubble-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.community-message-card.bot .msg-bubble-card {
  border-top-left-radius: 4px;
}

.community-message-card.user .msg-bubble-card {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: transparent;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.sender-nickname {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.community-message-card.user .sender-nickname {
  color: #FFFFFF;
  text-align: right;
}

.community-chat-form {
  display: flex;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  gap: 12px;
}

.community-chat-form input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: inherit;
  outline: none;
}

.community-chat-form input:focus {
  border-color: var(--primary);
}

.community-chat-send-btn {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* PAGE: SCANNER AI STYLES */
.image-upload-wrapper {
  width: 100%;
}

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

.upload-placeholder {
  border: 2px dashed var(--input-border);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.upload-placeholder:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.upload-icon {
  font-size: 40px;
}

.upload-text {
  font-size: 13px;
  color: var(--text-muted);
}

  .upload-placeholder.has-preview {
    padding: 0;
    min-height: auto;
    border: 1px solid var(--primary);
    background: transparent;
  }

  #scanner-preview-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    position: relative;
    border-radius: 14px;
    display: block;
  }

.preview-hidden {
  display: none;
}

.scanner-results-content {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.scanner-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  gap: 10px;
}

/* Scanner Image-confined Laser Overlay */
.scanner-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(16, 185, 129, 0.08);
  border: 2px solid var(--primary);
  box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.25);
  z-index: 10;
}

.scanner-image-overlay .scanner-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #10B981;
  box-shadow: 0 0 15px #10B981, 0 0 25px #10B981;
  animation: laserScanImage 1.8s infinite ease-in-out;
}

@keyframes laserScanImage {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 98%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}

@keyframes pulseGlow {
  0% { opacity: 0.4; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

/* Results panel scanner loader */
.scanner-loader-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
}

/* Calorie large indicator */
.calorie-badge-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px auto 24px auto;
  background: var(--primary-glow);
  border: 1px solid rgba(16, 185, 129, 0.2);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  justify-content: center;
  box-shadow: 0 10px 20px var(--primary-glow);
}

#scan-calories-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.cal-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Macronutrient progress bars */
.macro-charts-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.macro-bar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.macro-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--card-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-in-out;
}

.progress-bar-fill.success {
  background: var(--primary);
}

.progress-bar-fill.info {
  background: var(--info);
}

.progress-bar-fill.warning {
  background: var(--warning);
}

.scanner-coach-advice-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid var(--primary);
}

body.light-theme .scanner-coach-advice-card {
  background: var(--bg);
}

.advice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13.5px;
}

.advice-body {
  font-size: 12.5px;
  line-height: 1.5;
}

/* PAGE: COACH CHATBOT */
.chatbot-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chatbot-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.coach-avatar-large {
  font-size: 32px;
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coach-status-info h3 {
  font-size: 16px;
  font-weight: 700;
}

.status-online {
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.status-online .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

.chat-messages-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg);
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-message.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-bubble {
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
}

.chat-message.bot .msg-bubble {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-top-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.chat-message.bot .msg-bubble p {
  margin: 0 0 12px 0;
  line-height: 1.65;
}

.chat-message.bot .msg-bubble p:last-child {
  margin-bottom: 0;
}

.chat-message.bot .msg-bubble strong {
  color: var(--primary);
  font-weight: 700;
}

body.light-theme .chat-message.bot .msg-bubble strong {
  color: #047857;
}

.chat-message.bot .msg-bubble em {
  font-style: italic;
  color: var(--text-primary);
}

.chat-message.bot .msg-bubble .coach-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 14px 0 8px 0;
  letter-spacing: 0.2px;
}

.chat-message.bot .msg-bubble ul.coach-list {
  margin: 10px 0 14px 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message.bot .msg-bubble ul.coach-list li {
  position: relative;
  padding-left: 24px;
  line-height: 1.55;
  font-size: 14px;
}

.chat-message.bot .msg-bubble ul.coach-list li::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: -1px;
  color: var(--primary);
  font-size: 20px;
  line-height: 1.2;
}

.chat-message.bot .msg-bubble ol.coach-list-numbered {
  margin: 10px 0 14px 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message.bot .msg-bubble ol.coach-list-numbered li {
  line-height: 1.55;
  padding-left: 4px;
  font-size: 14px;
}

.chat-message.bot .msg-bubble ol.coach-list-numbered li::marker {
  color: var(--primary);
  font-weight: 800;
}

.chat-message.bot .msg-bubble .coach-highlight-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3.5px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.6;
}

body.light-theme .chat-message.bot .msg-bubble .coach-highlight-box {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #059669;
}

/* ==========================================
   COACH AI SUGGESTED PRODUCTS SHOWCASE
   ========================================== */
.coach-suggested-products {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

body.light-theme .coach-suggested-products {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.coach-products-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 12px;
}

body.light-theme .coach-products-header {
  color: #047857;
}

.coach-products-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

body.light-theme .coach-product-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.coach-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

body.light-theme .coach-product-card:hover {
  border-color: #059669;
  background: #F0FDF4;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.15);
}

.coach-product-thumb {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 10px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.coach-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.coach-product-card:hover .coach-product-thumb img {
  transform: scale(1.08);
}

.coach-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.coach-product-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light-theme .coach-product-badge {
  color: #047857;
}

.coach-product-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-product-benefit {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coach-product-cta {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--btn-text);
  background: var(--btn-bg);
  padding: 5px 10px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.coach-product-cta:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  transform: translateY(-1px);
}

body.light-theme .coach-product-cta {
  color: var(--btn-text);
  background: var(--btn-bg);
}


.chat-message.user .msg-bubble {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.suggestion-chips {
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  align-items: center;
}

.chip {
  background: var(--bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--card-bg);
  transform: translateY(-1px);
}

.chat-input-form {
  padding: 18px 24px;
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
}

.chat-input-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s;
}

.chat-input-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.chat-send-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  padding: 0 24px;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(-1px);
}

/* PAGE: RECIPES SECTION */
.recipes-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  padding: 12px 14px 12px 38px;
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.recipe-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, border-color 0.3s;
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: var(--input-border);
}

.recipe-image-placeholder {
  height: 160px;
  background: linear-gradient(135deg, #1A2E26 0%, #0F1A15 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 54px;
  position: relative;
}

body.light-theme .recipe-image-placeholder {
  background: linear-gradient(135deg, #E6F7F0 0%, #D1F2E5 100%);
}

.recipe-category-tag {
  position: absolute;
  bottom: 12px;
  left: 16px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid var(--card-border);
}

.recipe-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.recipe-body h3 {
  font-size: 17px;
  font-weight: 700;
}

.recipe-meta-row {
  display: flex;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.recipe-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 10px 0;
}

.recipe-ingredients-preview {
  font-size: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.4;
  margin-top: auto;
}

body.light-theme .recipe-ingredients-preview {
  background: var(--bg);
}

.recipe-products-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.light-theme .recipe-products-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.recipe-products-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light-theme .recipe-products-label {
  color: #047857;
}

.recipe-products-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recipe-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

body.light-theme .recipe-product-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.recipe-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

body.light-theme .recipe-product-card:hover {
  border-color: #059669;
  background: #F0FDF4;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}

.recipe-product-thumb {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.recipe-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.recipe-product-card:hover .recipe-product-thumb img {
  transform: scale(1.08);
}

.recipe-product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recipe-product-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light-theme .recipe-product-badge {
  color: #047857;
}

.recipe-product-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-product-benefit {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-product-cta {
  font-size: 11px;
  font-weight: 800;
  color: var(--btn-text);
  background: var(--btn-bg);
  padding: 4px 9px;
  border-radius: 7px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.recipe-product-cta:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  transform: translateY(-1px);
}

body.light-theme .recipe-product-cta {
  color: var(--btn-text);
  background: var(--btn-bg);
}

/* PAGE: PROFILE & SETTINGS */
.profile-hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow);
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-hero-avatar-wrapper {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
}

.profile-hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

body.light-theme .profile-hero-stats-grid {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

body.light-theme .hero-stat-pill {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.08);
}

.hero-stat-pill .pill-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.hero-stat-pill .pill-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
  animation: fadeInProfileTab 0.3s ease;
}

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

@media (max-width: 768px) {
  .profile-hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-form input, .settings-form select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s;
}

.settings-form input:focus, .settings-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.profile-settings-card {
  flex: 1;
}

/* WhatsApp report exporter styling */
.whatsapp-report-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
  transition: all 0.3s;
}

.whatsapp-report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.danger-zone-body {
  margin-top: 10px;
}

.reset-maratona-btn {
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--btn-text);
  padding: 14px;
  border-radius: var(--btn-radius);
  font-family: inherit;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.reset-maratona-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
  transform: translateY(-1px);
}

/* Mobile Bottom Navigation Bar styling */
.bottom-nav {
  display: none; /* Hidden on desktop screens */
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999 !important; /* Always elevated above all elements on mobile */
  padding: 8px 12px;
  justify-content: space-around;
  box-shadow: 0 -4px 25px rgba(0,0,0,0.5);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.light-theme .bottom-nav {
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.bottom-nav .nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  cursor: pointer;
  flex: 1;
  max-width: 80px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav .nav-item * {
  pointer-events: none; /* Allows click to target parent button cleanly */
}

.day-btn * {
  pointer-events: none;
}

.bottom-nav .nav-item .nav-icon {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.bottom-nav .nav-item .nav-lbl {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.bottom-nav .nav-item.active {
  color: var(--primary);
}

.bottom-nav .nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
}

/* Lock Screen / Access Control styling */
.lock-screen-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg-gradient);
  padding: 24px;
}

.lock-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pageFadeIn 0.5s ease forwards;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: inline-block;
}

.lock-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.lock-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.lock-hint {
  font-size: 12px !important;
  font-style: italic;
  margin-top: -12px;
}

.lock-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.lock-btn {
  padding: 14px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
}

.lock-btn.primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.lock-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.lock-btn.secondary {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text);
}

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

.lock-footer {
  border-top: 1px solid var(--card-border);
  padding-top: 18px;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .app-layout {
    grid-template-columns: 1fr; /* Hide sidebar grid structure */
  }
  .sidebar {
    display: none; /* Hide sidebar completely */
  }
  .bottom-nav {
    display: flex; /* Show mobile bottom navbar */
  }
  .main-content {
    padding: 24px 16px 100px 16px;
  }
  .community-layout-grid {
    grid-template-columns: 1fr;
  }
  .community-channels-sidebar {
    display: none; /* Hide channels sidebar on mobile to save space */
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr; /* Stack columns on small viewports */
  }
  .settings-row-2, .settings-row-3 {
    grid-template-columns: 1fr;
  }
  .movement-row {
    flex-direction: column;
    gap: 8px;
  }
  .leaderboard-header-row, .leaderboard-row {
    grid-template-columns: 40px 1fr 90px 70px;
  }
  .lbl-trend, .trend-indicator {
    display: none; /* Hide trend column on smaller displays */
  }
  .app-header h1 {
    font-size: 22px;
  }
  .detail-stat-val {
    font-size: 26px;
  }
  .stats-detailed-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* Meal suggestions styling */
.meal-suggestions-card {
  border-left: 4px solid var(--primary);
}

.meal-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.meal-suggestion-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

body.light-theme .meal-suggestion-item {
  background: var(--bg);
}

.meal-suggestion-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.meal-time-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 4px 8px;
  border-radius: 6px;
  align-self: flex-start;
  letter-spacing: 0.5px;
}

.meal-text-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

@media (max-width: 768px) {
  .meal-suggestions-grid {
    grid-template-columns: 1fr; /* Stack on mobile screens */
    gap: 12px;
  }
}

/* Form Sections */
.profile-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ==========================================
   GLOBAL FORM ELEMENTS & INPUT CONTROLS SYSTEM
   ========================================== */

/* Universal Input Group Layout */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}

.input-group label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

/* Global Input Fields (Text, Email, Tel, Number, Select, Textarea) */
.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="email"],
.input-group input[type="tel"],
.input-group select,
.input-group textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  background: var(--card-bg) !important;
  border: 1px solid var(--input-border) !important;
  color: var(--text) !important;
  padding: 14px 18px !important;
  border-radius: 12px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow), 0 0 15px rgba(16, 185, 129, 0.2) !important;
  background: rgba(15, 23, 42, 0.8) !important;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Custom File Upload Button System */
.custom-file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.file-hidden-input {
  display: none !important;
}

.custom-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed var(--primary);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  user-select: none;
}

.custom-file-btn:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  border-style: solid;
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-1px);
}

.profile-photo-avatar-preview {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  flex-shrink: 0;
}

/* Global Checkboxes & Habits Grid System */
.habits-checkbox-group {
  margin-top: 18px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.check-inline-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  width: 100%;
}

.check-inline-simple:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

.custom-chk-simple {
  width: 22px !important;
  height: 22px !important;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 6px;
  margin: 0 !important;
}

.check-inline-simple label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  cursor: pointer;
  margin: 0 !important;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Global Submit Button (for standard forms) */
.submit-btn, 
.profile-settings-card button[type="submit"], 
.lock-card button[type="submit"] {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  border: 1px solid var(--btn-border) !important;
  padding: 15px 28px !important;
  border-radius: var(--btn-radius) !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: var(--btn-shadow) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.submit-btn:hover, 
.profile-settings-card button[type="submit"]:hover,
.lock-card button[type="submit"]:hover {
  background: var(--btn-bg-hover) !important;
  color: var(--btn-text) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--btn-shadow-hover) !important;
}

.submit-btn:active, 
.profile-settings-card button[type="submit"]:active,
.lock-card button[type="submit"]:active {
  background: var(--btn-bg-active) !important;
  transform: translateY(0) !important;
}

/* Chat & Community Input Row Layout Overrides */
.chat-input-form,
.community-chat-input-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.chat-input-form input[type="text"],
.community-chat-input-row input[type="text"],
#chat-input-field,
#community-message-input {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  background: var(--bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
}

.chat-input-form button[type="submit"],
.community-chat-input-row button[type="submit"],
.chat-send-btn {
  width: auto !important;
  min-width: 110px !important;
  max-width: 160px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 14px 22px !important;
  white-space: nowrap !important;
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

@media (max-width: 576px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* Nutritional Strategy Styles */
.profile-strategy-card {
  border-left: 4px solid var(--primary);
}

.strategy-metric-box {
  background: var(--bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 12px;
}

.metric-title {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.metric-large-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* BMI Scale Bar */
.bmi-scale-bar {
  position: relative;
  height: 8px;
  display: flex;
  border-radius: 4px;
  overflow: visible;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
}

.bmi-segment {
  height: 100%;
}

.bmi-segment.underweight {
  width: 18.5%;
  background: #3498db;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.bmi-segment.normal {
  width: 6.5%; /* 18.5 to 25 = 6.5% relative scaled */
  /* Actually let's scale standard percentage */
  width: 25%;
  background: #2ecc71;
}

.bmi-segment.overweight {
  width: 25%;
  background: #f1c40f;
}

.bmi-segment.obese {
  width: 31.5%;
  background: #e74c3c;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.bmi-indicator {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.strategy-block {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 12px 14px;
  border-radius: 8px;
}

/* Gamification & Achievements Badges */
.achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.achievement-item.locked {
  filter: grayscale(1) opacity(0.35);
  border-style: dashed;
}

.achievement-item.unlocked {
  filter: none;
  opacity: 1;
  border-color: var(--primary);
  background: radial-gradient(circle at top right, rgba(46, 125, 50, 0.15), var(--card-bg));
  box-shadow: 0 4px 15px var(--primary-glow);
  animation: badgeUnlockPulse 1s ease;
}

.badge-icon-large {
  font-size: 32px;
  margin-bottom: 8px;
}

.badge-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 11px;
  line-height: 1.3;
}

@keyframes badgeUnlockPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 25px var(--primary); }
  100% { transform: scale(1); }
}

/* Reminders & Alarms */
.reminder-time-input {
  background: var(--bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  transition: border 0.3s;
}

.reminder-time-input:focus {
  border-color: var(--primary);
}

/* Toast Notification Container & Toasts */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  pointer-events: none;
}

.toast-alert {
  pointer-events: auto;
  background: var(--card-bg);
  border-left: 4px solid var(--primary);
  border-top: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-alert.show {
  transform: translateX(0);
}

.toast-alert.badge-toast {
  border-left-color: #ffd700; /* Gold for achievements */
  background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.08), var(--card-bg));
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.15);
}

.toast-icon {
  font-size: 24px;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}

.toast-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Print Layout Override Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt !important;
  }

  .sidebar, aside, .bottom-nav, .app-header, .theme-toggle, .lang-selector-container, .no-print, button, form {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .app-page {
    display: none !important;
  }

  #page-grafici {
    display: block !important;
  }

  .dashboard-grid {
    display: block !important;
  }

  .dashboard-card {
    background: #ffffff !important;
    border: 1px solid #dddddd !important;
    color: #000000 !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid !important;
  }

  .text-muted, .detail-stat-lbl {
    color: #555555 !important;
  }

  .detail-stat-val {
    color: #000000 !important;
    font-size: 20pt !important;
  }

  /* Force charts visibility if SVG */
  svg {
    max-width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
  }
}

/* Coach Dashboard Layout Styles */
.coach-main-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
}

.coach-clients-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-card-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.client-card-item.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.client-avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}

.client-info-mini {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-name-mini {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-email-mini {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-compliance-mini {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

/* Daily meal suggestion real images styling */
.meal-suggestions-card .suggested-meals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 15px;
}

.suggested-meal-box {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.suggested-meal-img-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  background: rgba(255,255,255,0.02);
}

.suggested-meal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.suggested-meal-time-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.suggested-meal-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.suggested-meal-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

/* Community chat uploaded photos formatting */
.chat-photo-btn {
  color: var(--text-muted);
  transition: color 0.2s;
}

.chat-photo-btn:hover {
  color: var(--primary);
}

.chat-message-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
}

/* Responsive Coach grid */
@media (max-width: 992px) {
  .coach-main-grid {
    grid-template-columns: 1fr;
  }
  
  .meal-suggestions-card .suggested-meals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .meal-suggestions-card .suggested-meals-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   COMPACT TOP KPI CARDS (Punteggio + Peso Mattutino)
   ============================================================ */
.diario-top-compact-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
}

.top-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  transition: all 0.25s ease;
  position: relative;
}

.top-score-card {
  align-items: center;
  gap: 18px;
}

.score-radial-compact {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-display-compact {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.score-display-compact .score-num {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
}

.score-display-compact .score-max-compact {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 1px;
}

body.light-theme .score-display-compact .score-num {
  color: #0F172A;
}

.top-score-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.top-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.score-feedback-compact {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-mini-kpis-strip {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px 10px;
  gap: 12px;
  margin-top: 2px;
  width: fit-content;
}

body.light-theme .top-mini-kpis-strip {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.top-mini-kpi {
  display: flex;
  align-items: center;
  gap: 5px;
}

.top-kpi-val {
  font-size: 12px;
  font-weight: 800;
}

.top-kpi-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.top-kpi-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
}

body.light-theme .top-kpi-divider {
  background: #CBD5E1;
}

/* Weight Card Compact */
.top-weight-card {
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.top-weight-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-inline-compact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weight-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.weight-input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 36px 8px 12px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  outline: none;
  transition: all 0.2s ease;
}

.weight-input-wrapper input:focus {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.05);
}

body.light-theme .weight-input-wrapper input {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #0F172A;
}

.weight-input-wrapper .unit-tag {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.save-weight-btn-compact {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #061A14;
  border: none;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.save-weight-btn-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16, 185, 129, 0.5);
}

.check-desc-compact {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 860px) {
  .diario-top-compact-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================
   5 HABITS HERO HUB & INTERACTIVE MATRIX STYLES
   ========================================== */
.habits-hero-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25), 0 0 24px rgba(16, 185, 129, 0.08);
}

.habits-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.habits-hero-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.habits-hero-main-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.habits-hero-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.habits-completion-pill-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
}

.habits-hero-content {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}

.habits-ring-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* 5 Habits Interactive Overview Grid */
.habits-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.habit-overview-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.habit-overview-pill .pill-top {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.habit-num-tag {
  font-size: 11px;
  font-weight: 800;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.habit-overview-pill .habit-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.25;
}

.habit-overview-pill .habit-target-hint {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.2;
}

.habit-overview-pill.completed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.habit-overview-pill.completed .habit-num-tag {
  background: #10B981;
  color: #061A14;
}

.habit-overview-pill.completed .habit-name {
  color: #34D399;
}

body.light-theme .habits-hero-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

body.light-theme .habit-overview-pill {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

body.light-theme .habit-overview-pill .habit-name {
  color: #0F172A;
}

body.light-theme .habit-overview-pill.completed {
  background: #ECFDF5;
  border-color: #10B981;
}

@media (max-width: 840px) {
  .habits-hero-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .habits-ring-box {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 0 16px 0;
  }
  .habits-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

.progress-ring-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  stroke: url(#habits-radial-gradient);
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-ring-percentage {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.progress-ring-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-top: 2px;
  font-weight: 700;
}

.streak-badge-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #F87171;
  margin-bottom: 8px;
}

.habits-summary {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary);
}

/* ==========================================
   HOURLY TIMELINE STYLES ("Cosa fare ora?")
   ========================================== */
.timeline-slots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.timeline-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.timeline-slot.active-now {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.timeline-slot.active-now::after {
  content: "NOW";
  position: absolute;
  top: -8px;
  background: var(--primary);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.slot-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.slot-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.slot-title {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.slot-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================
   INTERACTIVE WATER CUPS STYLES
   ========================================== */
.water-cups-interactive-grid {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 14px 0;
}

.water-cup-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.water-cup-item:hover {
  border-color: #38BDF8;
  transform: translateY(-2px);
}

.water-cup-item.filled {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0.4) 100%);
  border: 1.5px solid #38BDF8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.cup-icon {
  font-size: 24px;
  filter: grayscale(100%) opacity(0.5);
  transition: all 0.25s ease;
}

.water-cup-item.filled .cup-icon {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.15);
}

.cup-volume {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

.water-cup-item.filled .cup-volume {
  color: #38BDF8;
}

/* ==========================================
   PWA INSTALL BANNER STYLES
   ========================================== */
.pwa-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 99980;
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-banner[style*="display: none"] {
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

@keyframes slideUpBanner {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-banner-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-icon {
  font-size: 28px;
}

.pwa-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.pwa-btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
}

.pwa-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .progress-ring-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .timeline-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================
   INTERACTIVE MEAL CARDS & MODAL STYLES
   ========================================== */
.interactive-meal-card {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.interactive-meal-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

.suggested-meal-cal-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
}

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

.suggested-meal-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.suggested-meal-prep {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.suggested-meal-footer-action {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.view-recipe-btn {
  font-size: 11px;
  font-weight: 800;
  color: var(--btn-text);
  background: var(--btn-bg);
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.interactive-meal-card:hover .view-recipe-btn {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow-hover);
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.meal-modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meal-modal-header {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.meal-modal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-modal-badge-group {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
}

.badge-outline {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.meal-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meal-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.meal-modal-desc {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.meal-modal-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill-icon {
  font-size: 20px;
}

.stat-pill-info {
  display: flex;
  flex-direction: column;
}

.stat-pill-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.stat-pill-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.meal-modal-macros-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.macro-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-badge span {
  font-size: 10px;
  color: var(--text-muted);
}

.macro-badge strong {
  font-size: 14px;
  color: var(--text);
}

.meal-modal-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
}

.meal-modal-section h4 {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coach-tip-section {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.meal-modal-footer {
  padding: 0 20px 20px 20px;
}

.btn-primary-glow {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  border: 1px solid var(--btn-border) !important;
  padding: 12px 20px;
  border-radius: var(--btn-radius);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: all 0.2s ease;
}

.btn-primary-glow:hover {
  background: var(--btn-bg-hover) !important;
  color: var(--btn-text) !important;
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}







/* ==========================================
   WHATSAPP-STYLE COMMUNITY CHAT UI
   ========================================== */
.channel-group-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.channel-group-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.channel-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.channel-item-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.channel-item-card.active {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

body.light-theme .channel-item-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .channel-item-card:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .channel-item-card.active {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
}

.channel-avatar-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.channel-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-badge-unread {
  font-size: 10px;
  font-weight: 800;
  background: #10b981;
  color: #061a14;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.whatsapp-box-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #0b141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

body.light-theme .whatsapp-box-container {
  background: #efeae2;
  border-color: rgba(0, 0, 0, 0.1);
}

.whatsapp-chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #202c33;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

body.light-theme .whatsapp-chat-header {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.08);
}

.wa-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a884, #005c4b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3);
}

.wa-header-info {
  flex: 1;
  min-width: 0;
}

.wa-chat-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #e9edef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-theme .wa-chat-title {
  color: #111b21;
}

.wa-chat-status {
  font-size: 11px;
  color: #00a884;
  font-weight: 500;
  display: block;
}

.whatsapp-stream-container {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.light-theme .whatsapp-stream-container {
  background-color: #efeae2;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Date separator pill */
.wa-date-divider {
  align-self: center;
  background: rgba(17, 27, 33, 0.85);
  color: #8696a0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
  margin: 8px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light-theme .wa-date-divider {
  background: #ffffff;
  color: #54656f;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* WhatsApp Message Bubble */
.wa-message-row {
  display: flex;
  width: 100%;
  margin-bottom: 2px;
}

.wa-message-row.sent {
  justify-content: flex-end;
}

.wa-message-row.received {
  justify-content: flex-start;
}

.wa-message-bubble {
  max-width: 78%;
  padding: 6px 9px 6px 12px;
  border-radius: 10px;
  position: relative;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  word-break: break-word;
}

/* Sent Bubble (User) */
.wa-message-row.sent .wa-message-bubble {
  background: #005c4b;
  color: #e9edef;
  border-top-right-radius: 2px;
}

body.light-theme .wa-message-row.sent .wa-message-bubble {
  background: #d9fdd3;
  color: #111b21;
}

/* Received Bubble (Others) */
.wa-message-row.received .wa-message-bubble {
  background: #202c33;
  color: #e9edef;
  border-top-left-radius: 2px;
}

body.light-theme .wa-message-row.received .wa-message-bubble {
  background: #ffffff;
  color: #111b21;
}

/* Coach / System Bubble */
.wa-message-row.coach .wa-message-bubble {
  background: linear-gradient(135deg, #1f2c34, #182229);
  border: 1px solid rgba(0, 168, 132, 0.3);
  color: #e9edef;
}

body.light-theme .wa-message-row.coach .wa-message-bubble {
  background: linear-gradient(135deg, #f0fdf4, #e6f4ea);
  border: 1px solid rgba(0, 168, 132, 0.3);
  color: #111b21;
}

.wa-sender-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.wa-sender-name {
  font-size: 12px;
  font-weight: 700;
  color: #00a884;
}

.wa-message-row.sent .wa-sender-name {
  display: none;
}

.wa-message-text {
  margin: 0;
  font-size: 14px;
}

.wa-message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
  float: right;
  margin-left: 12px;
}

.wa-message-time {
  font-size: 11px;
  color: #8696a0;
}

body.light-theme .wa-message-time {
  color: #667781;
}

.wa-ticks {
  font-size: 12px;
  color: #53bdeb; /* WhatsApp blue ticks */
  line-height: 1;
}

.wa-message-image {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  display: block;
}

/* WhatsApp Input Footer */
.whatsapp-input-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #202c33;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .whatsapp-input-footer {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.08);
}

.wa-input-action-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #8696a0;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, color 0.15s;
}

.wa-input-action-btn:hover {
  color: #00a884;
  transform: scale(1.1);
}

.wa-input-pill-wrapper {
  flex: 1;
  background: #2a3942;
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 2px 14px;
}

body.light-theme .wa-input-pill-wrapper {
  background: #ffffff;
}

.wa-input-pill-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: #e9edef;
  font-size: 14px;
  padding: 9px 0;
  outline: none;
  font-family: inherit;
}

body.light-theme .wa-input-pill-wrapper input {
  color: #111b21;
}

.wa-send-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #00a884;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 168, 132, 0.4);
  transition: transform 0.15s, background 0.15s;
}

.wa-send-circle-btn:hover {
  background: #02906f;
  transform: scale(1.05);
}

.wa-send-circle-btn:active {
  transform: scale(0.95);
}

/* ============================================================
   SEGMENTED SUB-NAVIGATION FOR ANDAMENTO & REPORT
   ============================================================ */
.progress-subnav-container {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 24px;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.progress-subnav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 12px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-subtab-pane {
  display: none;
  animation: fadeInProgressPane 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-subtab-pane.active {
  display: block;
}

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

@media (max-width: 768px) {
  .progress-subnav-container {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
    gap: 4px;
  }
  .progress-subnav-container::-webkit-scrollbar {
    display: none;
  }
  .progress-subnav-btn {
    flex: 1 0 auto;
    padding: 10px 12px;
    font-size: 12.5px;
    gap: 6px;
  }
}

/* ============================================================
   PROGRESS BIO-DOSSIER WIDGETS (3x2 Responsive Grid)
   ============================================================ */
.progress-profile-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.progress-bio-widget {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.progress-bio-widget:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.progress-bio-icon {
  font-size: 26px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-bio-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.progress-bio-lbl {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bio-val {
  font-size: 17.5px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bio-val.highlight {
  color: #10B981;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .progress-profile-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .progress-profile-metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .progress-bio-widget {
    padding: 12px 16px;
    min-height: 72px;
    gap: 12px;
  }
  .progress-bio-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .progress-bio-lbl {
    font-size: 11px;
  }
  .progress-bio-val {
    font-size: 15.5px;
  }
}

/* ============================================================
   DIARIO DI BORDO — WIDGETS & TIMELINE ENHANCEMENTS
   ============================================================ */
.suggested-meal-box.active-now {
  border-color: #10B981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35) !important;
}

.suggested-meal-box.active-now .suggested-meal-time-overlay {
  background: #10B981 !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* 5 Daily Habits Mini Tracker & Badges */
.habits-mini-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.habit-mini-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: default;
}

.habit-mini-pill.completed {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10B981;
  color: #34D399;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

body.light-theme .habit-mini-pill {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #64748B;
}

body.light-theme .habit-mini-pill.completed {
  background: #ECFDF5;
  border-color: #059669;
  color: #047857;
}

/* ============================================================
   5 HABITS CHECKLIST — ULTRA-PREMIUM UNIFIED HEADERS
   ============================================================ */
.habit-checklist-header {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(15, 23, 42, 0.92) 55%, rgba(30, 41, 59, 0.85) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-left: 5px solid #10B981 !important;
  border-radius: 18px !important;
  padding: 14px 20px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.light-theme .habit-checklist-header {
  background: linear-gradient(135deg, #ECFDF5 0%, #FFFFFF 60%, #F8FAFC 100%) !important;
  border: 1px solid #A7F3D0 !important;
  border-left: 5px solid #059669 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1) !important;
}

/* Big, prominent glowing number badge */
.habit-badge-number {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #061A14 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  flex-shrink: 0 !important;
  letter-spacing: -0.5px !important;
}

body.light-theme .habit-badge-number {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  color: #FFFFFF !important;
}

/* Text Content */
.habit-badge-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.habit-badge-sub {
  font-size: 11.5px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #34D399 !important;
}

body.light-theme .habit-badge-sub {
  color: #059669 !important;
}

.habit-badge-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.1px !important;
  line-height: 1.35 !important;
}

body.light-theme .habit-badge-title {
  color: #0F172A !important;
}

/* Reward points pill */
.habit-badge-pts {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #34D399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  padding: 6px 14px !important;
  border-radius: 30px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2) !important;
}

body.light-theme .habit-badge-pts {
  background: #D1FAE5 !important;
  border-color: #6EE7B7 !important;
  color: #065F46 !important;
}

/* ============================================================
   5 HABITS STANDALONE 2-COLUMN CARDS GRID IN MAIN CONTAINER
   ============================================================ */
.checklist-main-container-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: var(--shadow-lg);
}

.habits-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.habit-standalone-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

body.light-theme .habit-standalone-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.habit-standalone-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #10B981, #06B6D4);
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.habit-standalone-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}

body.light-theme .habit-standalone-card:hover {
  border-color: #10B981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

.habit-standalone-card.habit-span-2 {
  grid-column: span 2;
}

.habit-standalone-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .habit-standalone-header {
  border-bottom-color: #E2E8F0;
}

.habit-standalone-num {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10B981, #06B6D4);
  color: #061A14;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

body.light-theme .habit-standalone-num {
  color: #FFFFFF;
  background: linear-gradient(135deg, #10B981, #047857);
}

.habit-standalone-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.habit-standalone-sub {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #10B981;
}

body.light-theme .habit-standalone-sub {
  color: #059669;
}

.habit-standalone-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.habit-standalone-pts {
  font-size: 12px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

body.light-theme .habit-standalone-pts {
  background: #D1FAE5;
  border-color: #6EE7B7;
  color: #065F46;
}

.habit-standalone-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 860px) {
  .habits-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .habit-standalone-card.habit-span-2 {
    grid-column: span 1;
  }
}

/* ============================================================
   BULLETPROOF FULLSCREEN AUTH WALL (UNAUTHENTICATED GATE)
   ============================================================ */
body.auth-locked {
  overflow: hidden !important;
  background: #080D1A !important;
}

body.auth-locked .app-layout,
body.auth-locked .bottom-nav,
body.auth-locked #pwa-install-banner,
body.auth-locked #sponsor-contact-modal,
body.auth-locked #meal-modal {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.auth-locked #account-auth-modal {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: radial-gradient(circle at 50% 25%, #0F1D33 0%, #060B14 100%) !important;
  backdrop-filter: none !important;
  z-index: 99999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  overflow-y: auto !important;
}

body.auth-locked #account-auth-modal .modal-card {
  max-width: 450px !important;
  width: 100% !important;
  background: #111A2E !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 24px !important;
  padding: 32px 24px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(16, 185, 129, 0.2) !important;
  position: relative !important;
  animation: authWallCardFadeIn 0.35s ease-out forwards !important;
  margin: auto !important;
}

@keyframes authWallCardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(14px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.auth-locked #close-auth-modal-btn {
  display: none !important;
  pointer-events: none !important;
}

.auth-wall-lang-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-wall-lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-wall-lang-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #FFFFFF;
  border-color: rgba(16, 185, 129, 0.4);
}

.auth-wall-lang-btn.active {
  background: rgba(16, 185, 129, 0.25);
  color: #34D399;
  border-color: #10B981;
}







/* ==========================================================================
   MOBILE-FIRST GLOBAL RESPONSIVE ENGINE (PROGRAMMA 10 GIORNI PWA)
   ========================================================================== */

/* Universal Touch & Safe Area Foundations */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bottom-nav-height: 64px;
}

html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent !important;
}

button, a, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}

/* Prevent image dragging on touch */
img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Base Body scroll lock for open modals */
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
}

/* ==========================================================================
   BREAKPOINT: TABLET & DESKTOP COLLAPSE (< 992px)
   ========================================================================== */
@media (max-width: 992px) {
  .app-layout {
    grid-template-columns: 1fr !important;
    min-height: 100vh;
  }

  .sidebar {
    display: none !important;
  }

  .bottom-nav {
    display: flex !important;
  }

  .main-content {
    padding: 16px 16px calc(var(--bottom-nav-height) + var(--safe-bottom) + 24px) 16px !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .community-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .community-channels-sidebar {
    display: none !important;
  }

  .coach-main-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ==========================================================================
   BREAKPOINT: SMARTPHONE STANDARDS (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Main Container Spacing */
  .main-content {
    padding: 12px 12px calc(var(--bottom-nav-height) + var(--safe-bottom) + 20px) 12px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* App Header Sticky & Fluid */
  .app-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 10px 14px !important;
    margin: -12px -12px 14px -12px !important;
    background: rgba(10, 15, 29, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  body.light-theme .app-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  }

  .header-left {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .header-left h1, #page-title {
    font-size: clamp(1.1rem, 4.2vw, 1.35rem) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .header-left p, #page-subtitle {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin: 2px 0 0 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    opacity: 0.8 !important;
  }

  .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .header-account-pill {
    padding: 5px 9px !important;
    font-size: 11px !important;
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border-radius: 16px !important;
  }

  .lang-select-dropdown {
    padding: 4px 6px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    height: 32px !important;
  }

  .theme-toggle {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .active-badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  /* Universal Dashboard Grids */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* -------------------------------------------------------------
     PAGE: DIARIO DI BORDO
     ------------------------------------------------------------- */
  /* 1. Day Selector Slider */
  .day-slider-container {
    margin-bottom: 14px !important;
    padding: 0 !important;
  }

  .day-slider {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    padding: 4px 2px 10px 2px !important;
  }

  .day-slider::-webkit-scrollbar {
    display: none !important;
  }

  .day-btn {
    min-width: 60px !important;
    height: 64px !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    border-radius: 16px !important;
    padding: 8px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
  }

  /* 2. Top KPI Compact Row (Score & Morning Weight) */
  .diario-top-compact-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .top-kpi-card {
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  .top-score-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .score-radial-compact svg {
    width: 68px !important;
    height: 68px !important;
  }

  .top-score-right {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .top-mini-kpis-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  .top-mini-kpi .top-kpi-val {
    font-size: 14px !important;
  }

  .top-mini-kpi .top-kpi-lbl {
    font-size: 9.5px !important;
  }

  .top-weight-body .input-inline-compact {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .weight-input-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .weight-input-wrapper input {
    height: 44px !important;
    font-size: 15px !important;
    padding: 8px 12px !important;
  }

  .save-weight-btn-compact {
    height: 44px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* 3. 5-Habits Hero Hub */
  .habits-hero-card {
    padding: 18px 14px !important;
    border-radius: 20px !important;
    margin-bottom: 18px !important;
  }

  .habits-hero-top-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .habits-hero-main-title {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .habits-hero-subtitle {
    font-size: 12px !important;
  }

  .habits-hero-content {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .habits-ring-box {
    display: flex !important;
    justify-content: center !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0 0 14px 0 !important;
    margin: 0 !important;
  }

  .habits-overview-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .habit-overview-pill {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  .pill-title {
    font-size: 12px !important;
  }

  /* 4. Daily Suggested Meals & Timeline */
  .timeline-slots-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .meal-suggestions-card .suggested-meals-grid,
  .meal-suggestions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .suggested-meal-card {
    border-radius: 16px !important;
    padding: 10px !important;
  }

  .suggested-meal-img-wrapper img {
    aspect-ratio: 16/10 !important;
    height: 110px !important;
    border-radius: 12px !important;
  }

  .suggested-meal-title {
    font-size: 13px !important;
    line-height: 1.25 !important;
    margin: 6px 0 !important;
  }

  .view-recipe-btn {
    min-height: 38px !important;
    font-size: 11.5px !important;
    padding: 8px !important;
    border-radius: 10px !important;
  }

  /* 5. Standalone 5 Habits Cards */
  .checklist-main-container-card {
    padding: 18px 14px !important;
    border-radius: 20px !important;
  }

  .habits-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .habit-standalone-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  .habit-standalone-card.habit-span-2 {
    grid-column: span 1 !important;
  }

  .habit-standalone-header {
    gap: 10px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
  }

  .habit-standalone-num {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 18px !important;
    border-radius: 10px !important;
  }

  .habit-standalone-title {
    font-size: 14px !important;
  }

  .habit-standalone-pts {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* Interactive Water Cups */
  .water-cups-grid-compact, .water-cup-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  .water-cup-btn-compact, .water-cup-btn {
    height: 46px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    padding: 4px !important;
  }

  .water-actions-compact {
    display: flex !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .water-btn-compact {
    flex: 1 !important;
    height: 42px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
  }

  /* Movement Row */
  .movement-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .movement-quick-presets {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
  }

  .preset-step-btn {
    flex: 1 !important;
    height: 38px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
  }

  /* -------------------------------------------------------------
     PAGE: RICETTE & CONSIGLI
     ------------------------------------------------------------- */
  .recipe-filters-scroll {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
    flex-wrap: nowrap !important;
  }

  .recipe-filter-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .recipes-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .recipe-card {
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .recipe-card-img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  /* -------------------------------------------------------------
     PAGE: SCANNER AI PIATTO
     ------------------------------------------------------------- */
  .scanner-panel-card {
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  .scanner-dropzone {
    min-height: 160px !important;
    padding: 20px 14px !important;
    border-radius: 14px !important;
  }

  .scanner-camera-btn-large {
    width: 100% !important;
    height: 50px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
  }

  .scanner-results-card {
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  .calories-circle-val {
    font-size: 32px !important;
  }

  /* -------------------------------------------------------------
     PAGE: COACH AI CHATBOT
     ------------------------------------------------------------- */
  .chatbot-container {
    height: calc(100vh - var(--bottom-nav-height) - var(--safe-bottom) - 100px) !important;
    min-height: 480px !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .chatbot-header {
    padding: 10px 14px !important;
  }

  .chatbot-messages {
    flex: 1 !important;
    padding: 12px 10px !important;
    gap: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .chatbot-bubble {
    max-width: 88% !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    border-radius: 16px !important;
  }

  .quick-prompts-bar {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding: 8px 10px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-shrink: 0 !important;
  }

  .quick-prompt-chip {
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .chatbot-input-bar {
    padding: 8px 10px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .chatbot-input-bar input {
    height: 42px !important;
    font-size: 13.5px !important;
    border-radius: 20px !important;
    padding: 0 14px !important;
  }

  .chatbot-send-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 50% !important;
  }

  /* -------------------------------------------------------------
     PAGE: ANDAMENTO & GRAFICI
     ------------------------------------------------------------- */
  .stats-detailed-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .detail-stat-val {
    font-size: 20px !important;
    font-weight: 800 !important;
  }

  .client-progress-profile-card {
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  .progress-profile-metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .progress-bio-widget {
    padding: 10px 12px !important;
  }

  .progress-subnav-container {
    display: flex !important;
    gap: 4px !important;
    overflow-x: auto !important;
    padding: 4px !important;
    border-radius: 12px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 14px !important;
  }

  .progress-subnav-btn {
    flex: 1 !important;
    min-width: 95px !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .chart-large-card svg {
    width: 100% !important;
    height: auto !important;
    min-height: 180px !important;
  }

  /* -------------------------------------------------------------
     PAGE: CONFRONTO GRUPPO / CLASSIFICA
     ------------------------------------------------------------- */
  .leaderboard-intro {
    padding: 16px 14px !important;
    border-radius: 18px !important;
    margin-bottom: 14px !important;
  }

  .leaderboard-intro h2 {
    font-size: 16px !important;
  }

  .leaderboard-card-container {
    border-radius: 18px !important;
  }

  .leaderboard-header-row,
  .leaderboard-row {
    grid-template-columns: 36px 1fr 65px 55px !important;
    gap: 6px !important;
    padding: 12px 10px !important;
    font-size: 12px !important;
  }

  .lbl-trend, .trend-indicator {
    display: none !important;
  }

  /* -------------------------------------------------------------
     PAGE: COMMUNITY CHAT
     ------------------------------------------------------------- */
  .community-chat-box {
    height: calc(100vh - var(--bottom-nav-height) - var(--safe-bottom) - 100px) !important;
    min-height: 480px !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .wa-chat-header {
    padding: 10px 12px !important;
  }

  .whatsapp-stream-container {
    flex: 1 !important;
    padding: 10px 8px !important;
    gap: 8px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .wa-message-bubble {
    max-width: 85% !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 14px !important;
  }

  .wa-input-footer {
    padding: 8px 10px !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .wa-input-footer input {
    height: 40px !important;
    font-size: 13.5px !important;
    border-radius: 20px !important;
    padding: 0 14px !important;
  }

  .wa-footer-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    font-size: 16px !important;
  }

  /* -------------------------------------------------------------
     PAGE: PROFILO & IMPOSTAZIONI
     ------------------------------------------------------------- */
  .profile-hero-card {
    padding: 18px 14px !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
  }

  .profile-hero-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .hero-stat-pill {
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }

  .profile-subnav-container {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding-bottom: 8px !important;
    margin-bottom: 14px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .profile-subnav-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .settings-row-2, .settings-row-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .input-group input, .input-group select, .input-group textarea {
    height: 46px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }

  .checkbox-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .custom-checkbox-label {
    min-height: 46px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  .submit-btn {
    width: 100% !important;
    max-width: 100% !important;
    height: 50px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
  }

  /* -------------------------------------------------------------
     PAGE: COACH DASHBOARD & SUPER ADMIN
     ------------------------------------------------------------- */
  .coach-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .coach-client-card {
    padding: 14px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
  }

  /* -------------------------------------------------------------
     MODALS & OVERLAYS (MOBILE BOTTOM-SHEET PATTERN)
     ------------------------------------------------------------- */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  #meal-detail-modal .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 88vh !important;
    max-height: 88vh !important;
    border-radius: 24px 24px 0 0 !important;
    background: #0E1626 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    border-bottom: none !important;
    padding: 20px 16px calc(24px + var(--safe-bottom)) 16px !important;
    margin: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    animation: modalSheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  @keyframes modalSheetSlideUp {
    from {
      transform: translateY(100%);
      opacity: 0.5;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  #close-meal-modal-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
    top: 14px !important;
    right: 14px !important;
    position: absolute !important;
    z-index: 20 !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .meal-modal-hero-img {
    aspect-ratio: 16/9 !important;
    max-height: 200px !important;
    width: 100% !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    margin-bottom: 14px !important;
  }

  .meal-modal-macros-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin: 12px 0 !important;
  }

  .sponsor-modal-card {
    width: 92% !important;
    max-width: 420px !important;
    margin: auto !important;
    border-radius: 22px !important;
    padding: 24px 18px !important;
  }

  #account-auth-modal .modal-card {
    width: 94% !important;
    max-width: 420px !important;
    margin: auto !important;
    border-radius: 24px !important;
    padding: 24px 18px !important;
  }

  /* PWA Install Banner Positioning */
  #pwa-install-banner {
    position: fixed !important;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px) !important;
    left: 12px !important;
    right: 12px !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    z-index: 99999 !important;
    border-radius: 16px !important;
  }

  /* Bottom Navigation Touch Feedback */
  .bottom-nav {
    height: calc(var(--bottom-nav-height) + var(--safe-bottom)) !important;
    padding: 4px 6px var(--safe-bottom) 6px !important;
    z-index: 999999 !important;
    background: rgba(10, 15, 29, 0.96) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .bottom-nav .nav-item {
    padding: 6px 2px !important;
    min-width: 0 !important;
  }

  .bottom-nav .nav-icon {
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .bottom-nav .nav-lbl {
    font-size: 10px !important;
    font-weight: 700 !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* ==========================================================================
   BREAKPOINT: NARROW SMARTPHONES (< 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .main-content {
    padding: 10px 8px calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px) 8px !important;
  }

  .app-header {
    padding: 8px 10px !important;
    margin: -10px -8px 12px -8px !important;
  }

  .header-left h1, #page-title {
    font-size: 1.15rem !important;
  }

  .header-account-pill {
    max-width: 90px !important;
    padding: 4px 7px !important;
  }

  .active-badge {
    display: none !important;
  }

  .meal-suggestions-card .suggested-meals-grid,
  .meal-suggestions-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .suggested-meal-img-wrapper img {
    height: 140px !important;
  }

  .stats-detailed-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .coach-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .leaderboard-header-row,
  .leaderboard-row {
    grid-template-columns: 32px 1fr 58px 48px !important;
    gap: 4px !important;
    padding: 10px 8px !important;
    font-size: 11px !important;
  }
}



/* ==========================================================================
   PREMIUM MONOCHROME BOTTOM NAV VECTOR SVG ICONS
   ========================================================================== */
.bottom-nav .nav-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  color: #94A3B8 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-svg-icon {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  transition: transform 0.25s ease, stroke 0.25s ease, filter 0.25s ease !important;
}

.bottom-nav .nav-item {
  position: relative !important;
  transition: color 0.2s ease, transform 0.15s ease !important;
}

.bottom-nav .nav-item:active {
  transform: scale(0.92) !important;
}

.bottom-nav .nav-item.active {
  color: #10B981 !important;
}

.bottom-nav .nav-item.active .nav-icon {
  color: #10B981 !important;
}

.bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #10B981 !important;
  transform: translateY(-2px) scale(1.12) !important;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.45)) !important;
}

.bottom-nav .nav-item.active .nav-lbl {
  color: #10B981 !important;
  font-weight: 800 !important;
}

/* Light theme overrides */
body.light-theme .bottom-nav .nav-icon {
  color: #64748B !important;
}

body.light-theme .bottom-nav .nav-item.active,
body.light-theme .bottom-nav .nav-item.active .nav-icon,
body.light-theme .bottom-nav .nav-item.active .nav-lbl {
  color: #059669 !important;
}

body.light-theme .bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #059669 !important;
  filter: drop-shadow(0 2px 6px rgba(5, 150, 105, 0.3)) !important;
}



/* ==========================================================================
   STREAMLINED ICON-ONLY HEADER CONTROLS
   ========================================================================== */
.header-account-btn,
.header-account-pill {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  cursor: pointer !important;
  color: var(--text) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  flex-shrink: 0 !important;
}

.header-account-btn:hover,
.header-account-pill:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10B981 !important;
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

#header-user-avatar {
  font-size: 16px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#header-user-avatar img {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

#header-user-name,
.header-user-name-hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

#header-sync-dot {
  position: absolute !important;
  bottom: 2px !important;
  right: 2px !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  background: #10B981 !important;
  border: 2px solid #0A0F1D !important;
  display: inline-block !important;
  z-index: 2 !important;
}

body.light-theme #header-sync-dot {
  border-color: #FFFFFF !important;
}

.active-badge,
.icon-only-badge,
#programma-status {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  flex-shrink: 0 !important;
}

#status-badge-text,
.status-badge-text-hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.pulse-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #10B981 !important;
  box-shadow: 0 0 10px #10B981 !important;
  margin: 0 !important;
}

.theme-toggle {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  font-size: 15px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-1px) scale(1.05) !important;
}

.lang-select-dropdown {
  height: 38px !important;
  border-radius: 12px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}



/* ==========================================================================
   HEADER FULL PHOTO PROFILE ICON & ICON-ONLY BOTTOM NAV BAR
   ========================================================================== */

/* 1. Header Full-Bleed Photo Profile Avatar */
.header-account-btn,
.header-account-pill {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: #0F172A !important;
  border: 2px solid #10B981 !important;
  cursor: pointer !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.header-account-btn:hover,
.header-account-pill:hover {
  transform: translateY(-1px) scale(1.08) !important;
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.45) !important;
  border-color: #34D399 !important;
}

#header-user-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0B1120 !important;
}

.header-avatar-img,
#header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  transform: scale(1.04) !important; /* Edge-to-edge perfect bleed */
}

#header-sync-dot {
  position: absolute !important;
  bottom: -2px !important;
  right: -2px !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  background: #10B981 !important;
  border: 2.5px solid #0A0F1D !important;
  display: inline-block !important;
  z-index: 5 !important;
  box-shadow: 0 0 6px #10B981 !important;
}

body.light-theme #header-sync-dot {
  border-color: #FFFFFF !important;
}

/* 2. Icon-Only Bottom Navigation Bar */
.bottom-nav {
  height: calc(58px + var(--safe-bottom)) !important;
  padding: 0 8px var(--safe-bottom) 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
}

.bottom-nav .nav-item {
  height: 48px !important;
  min-height: 48px !important;
  max-width: 60px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
}

.bottom-nav .nav-icon {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  color: #94A3B8 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-svg-icon {
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor !important;
  display: block !important;
}

.bottom-nav .nav-item.active .nav-icon {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #10B981 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}

.bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #10B981 !important;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5)) !important;
}

.bottom-nav .nav-lbl {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

body.light-theme .bottom-nav .nav-icon {
  color: #64748B !important;
}

body.light-theme .bottom-nav .nav-item.active .nav-icon {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10B981 !important;
  color: #059669 !important;
}

body.light-theme .bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #059669 !important;
}



/* ==========================================================================
   MOBILE CHANNELS DRAWER & SELECTOR SYSTEM (COMMUNITY CHAT)
   ========================================================================== */

/* Desktop defaults */
.wa-channels-toggle-btn {
  display: none !important;
}

.close-channels-sidebar-btn {
  display: none !important;
}

/* Breakpoint for Mobile & Tablet */
@media (max-width: 992px) {
  .community-layout-grid {
    display: block !important;
    position: relative !important;
  }

  .wa-channels-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: rgba(16, 185, 129, 0.18) !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    border-radius: 12px !important;
    color: #10B981 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin-right: 6px !important;
    transition: all 0.2s ease !important;
  }

  .wa-channels-toggle-btn:hover,
  .wa-channels-toggle-btn:active {
    background: rgba(16, 185, 129, 0.3) !important;
    transform: scale(0.96) !important;
  }

  .close-channels-sidebar-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #E2E8F0 !important;
    cursor: pointer !important;
  }

  /* Slide-in Mobile Drawer */
  .community-channels-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 86% !important;
    max-width: 350px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1000001 !important;
    background: #0D1527 !important;
    border-right: 1px solid rgba(16, 185, 129, 0.4) !important;
    border-radius: 0 20px 20px 0 !important;
    box-shadow: 15px 0 50px rgba(0, 0, 0, 0.9) !important;
    transform: translateX(-105%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: calc(16px + var(--safe-top)) 16px calc(20px + var(--safe-bottom)) 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .community-channels-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  /* Backdrop Overlay */
  .channels-backdrop,
  #channels-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(4, 8, 16, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 1000000 !important;
    animation: channelsBackdropFadeIn 0.25s ease-out forwards !important;
  }

  @keyframes channelsBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Channel Items in Drawer */
  .channel-item-card {
    padding: 12px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 6px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  .channel-item-card:hover,
  .channel-item-card:active {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
  }

  .channel-item-card.active {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: #10B981 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2) !important;
  }
}



/* ==========================================================================
   FIX FOR CHANNELS SIDEBAR BLUR & CRISP RENDERING ON MOBILE
   ========================================================================== */
@media (max-width: 992px) {
  /* Ensure sidebar is completely crisp, solid background, zero blur filter */
  .community-channels-sidebar {
    background: #0D1628 !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 10000005 !important;
    border-right: 2px solid rgba(16, 185, 129, 0.5) !important;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(16, 185, 129, 0.25) !important;
  }

  /* Scrim overlay without blur so nothing gets blurred */
  .channels-backdrop,
  #channels-backdrop {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    z-index: 10000000 !important;
  }

  /* Text & Elements inside sidebar 100% crisp */
  .community-channels-sidebar * {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1;
  }

  .channel-group-title {
    color: #34D399 !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin: 14px 0 8px 0 !important;
  }

  .channel-item-card {
    background: #131E35 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
  }

  .channel-card-name {
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
  }

  .channel-card-sub {
    color: #94A3B8 !important;
    font-size: 11px !important;
  }
}



/* ==========================================================================
   100% FULL BRIGHTNESS MOBILE CHANNELS DRAWER (ZERO DIMMING)
   ========================================================================== */
@media (max-width: 992px) {
  /* High-Contrast Full-Brightness Drawer */
  .community-channels-sidebar {
    background: #0B1120 !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 100000000 !important;
    border-right: 2px solid #10B981 !important;
    box-shadow: 25px 0 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(16, 185, 129, 0.3) !important;
    color: #FFFFFF !important;
  }

  .community-channels-sidebar.mobile-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Scrim backdrop placed behind the drawer */
  .channels-backdrop,
  #channels-backdrop {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    z-index: 99999999 !important;
  }

  /* 100% Crisp & Fully Lit Children Elements */
  .community-channels-sidebar * {
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  .community-sidebar-title {
    color: #FFFFFF !important;
    font-size: 16px !important;
    font-weight: 800 !important;
  }

  .channel-group-title {
    color: #10B981 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin: 16px 0 8px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .channel-item-card {
    background: #162238 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    color: #FFFFFF !important;
    transition: all 0.2s ease !important;
  }

  .channel-item-card:hover,
  .channel-item-card:active {
    background: #1E2E4A !important;
    border-color: #10B981 !important;
    transform: translateX(3px) !important;
  }

  .channel-item-card.active {
    background: rgba(16, 185, 129, 0.22) !important;
    border: 1.5px solid #10B981 !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35) !important;
  }

  .channel-card-name {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 14px !important;
  }

  .channel-card-sub {
    color: #94A3B8 !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
  }

  .channel-badge-unread {
    background: #EF4444 !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
  }
}



/* ==========================================================================
   COACH AI CHAT: NO HORIZONTAL OVERFLOW & HORIZONTAL CAROUSEL CHIPS
   ========================================================================== */

/* 1. Prevent Horizontal Scrollbar & Auto-Adapt Content */
.chatbot-container,
.chat-messages-wrapper,
#chat-messages-container {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.chat-messages-wrapper {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding: 16px 14px !important;
}

.chat-message {
  max-width: 88% !important;
  width: auto !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

@media (max-width: 768px) {
  .chat-message {
    max-width: 94% !important;
  }
}

.msg-bubble {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
}

.coach-suggested-products,
.coach-products-grid {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.coach-product-card {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
}

.coach-product-thumb {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  flex-shrink: 0 !important;
}

.coach-product-info {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.coach-product-name {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.coach-product-benefit {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

.coach-product-cta {
  white-space: nowrap !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
  width: 100% !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}

/* 2. Suggestion Chips: Single Horizontal Carousel Row */
.suggestion-chips,
#suggestion-chips-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  background: rgba(13, 21, 39, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  flex-shrink: 0 !important;
  scroll-snap-type: x mandatory !important;
}

.suggestion-chips::-webkit-scrollbar,
#suggestion-chips-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.suggestion-chips .chip {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  scroll-snap-align: start !important;
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #E2E8F0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.suggestion-chips .chip:hover,
.suggestion-chips .chip:active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  color: #10B981 !important;
  transform: scale(0.98) !important;
}

body.light-theme .suggestion-chips {
  background: #F8FAFC !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .suggestion-chips .chip {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #334155 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .suggestion-chips .chip:hover,
body.light-theme .suggestion-chips .chip:active {
  background: #ECFDF5 !important;
  border-color: #059669 !important;
  color: #059669 !important;
}



/* ==========================================================================
   PROFILE SUB-NAV: 2x2 COMPACT GRID ON MOBILE (100% VISIBLE, NO HIDDEN TABS)
   ========================================================================== */
.profile-subnav,
#profile-subnav-bar {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  padding: 6px !important;
  margin-bottom: 20px !important;
  overflow: visible !important;
}

@media (max-width: 768px) {
  .profile-subnav,
  #profile-subnav-bar {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    width: 100% !important;
  }
}

.profile-subnav .profile-subnav-btn,
#profile-subnav-bar .profile-subnav-btn {
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 8px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.profile-subnav .profile-subnav-btn.active,
#profile-subnav-bar .profile-subnav-btn.active {
  background: #10B981 !important;
  color: #042F2E !important;
  font-weight: 800 !important;
  border: 1px solid #10B981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.profile-subnav .profile-subnav-btn:not(.active),
#profile-subnav-bar .profile-subnav-btn:not(.active) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.profile-subnav .profile-subnav-btn:not(.active):hover,
.profile-subnav .profile-subnav-btn:not(.active):active,
#profile-subnav-bar .profile-subnav-btn:not(.active):hover,
#profile-subnav-bar .profile-subnav-btn:not(.active):active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.light-theme .profile-subnav,
body.light-theme #profile-subnav-bar {
  background: #EEF2F6 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .profile-subnav .profile-subnav-btn:not(.active),
body.light-theme #profile-subnav-bar .profile-subnav-btn:not(.active) {
  background: #FFFFFF !important;
  color: #475569 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .profile-subnav .profile-subnav-btn.active,
body.light-theme #profile-subnav-bar .profile-subnav-btn.active {
  background: #10B981 !important;
  color: #FFFFFF !important;
}



/* ==========================================================================
   COMPLETE MOBILE BOTTOM DOCK NAVIGATION (10 SLOTS WITH HORIZONTAL FLUIDITY)
   ========================================================================== */
.bottom-nav,
#app-bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: calc(56px + var(--safe-bottom)) !important;
  padding: 0 6px var(--safe-bottom) 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 4px !important;
  background: rgba(10, 15, 29, 0.95) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
}

.bottom-nav::-webkit-scrollbar,
#app-bottom-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.bottom-nav .nav-item {
  flex: 0 0 auto !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  cursor: pointer !important;
  color: #94A3B8 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.bottom-nav .nav-item .nav-icon {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.bottom-nav .nav-item .nav-svg-icon {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  display: block !important;
  transition: stroke 0.2s ease, transform 0.2s ease !important;
}

.bottom-nav .nav-item.active {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #10B981 !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3) !important;
}

.bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #10B981 !important;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6)) !important;
}

.bottom-nav .nav-item:not(.active):hover,
.bottom-nav .nav-item:not(.active):active {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FFFFFF !important;
}

body.light-theme .bottom-nav,
body.light-theme #app-bottom-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .bottom-nav .nav-item {
  color: #64748B !important;
}

body.light-theme .bottom-nav .nav-item.active {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10B981 !important;
  color: #059669 !important;
}

body.light-theme .bottom-nav .nav-item.active .nav-svg-icon {
  stroke: #059669 !important;
}



/* ==========================================================================
   LEADERBOARD FULL PHOTO & PERFECT GRID ALIGNMENT (ZERO CLIPPING)
   ========================================================================== */
.leaderboard-header-row,
.leaderboard-item-row {
  display: grid !important;
  grid-template-columns: 32px 42px 1fr 85px 75px 35px !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-sizing: border-box !important;
}

.leaderboard-header-row {
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--text-muted, #94A3B8) !important;
  letter-spacing: 0.5px !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.leaderboard-item-row.leaderboard-current-user {
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 14px !important;
  font-weight: 700 !important;
  margin: 4px 0 !important;
}

.col-rank.rank-cell {
  font-weight: 800 !important;
  font-size: 14px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.col-avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.leaderboard-user-photo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.col-name {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
  gap: 6px !important;
}

.participant-name-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
}

body.light-theme .participant-name-text {
  color: #1E293B !important;
}

.badge-you {
  font-size: 10px !important;
  background: #10B981 !important;
  color: white !important;
  padding: 2px 7px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}

.col-loss {
  font-weight: 700 !important;
  color: #10B981 !important;
  text-align: center !important;
  font-size: 13.5px !important;
}

.col-points {
  text-align: center !important;
}

.pts-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  color: #CBD5E1 !important;
}

.col-trend {
  text-align: center !important;
  font-size: 13px !important;
}

@media (max-width: 768px) {
  .leaderboard-header-row,
  .leaderboard-item-row {
    grid-template-columns: 24px 38px 1fr 70px 58px !important;
    gap: 6px !important;
    padding: 10px 8px !important;
  }

  .col-avatar {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
  }

  .leaderboard-user-photo {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
  }

  .lbl-trend,
  .col-trend {
    display: none !important;
  }

  .participant-name-text {
    font-size: 12.5px !important;
  }

  .col-loss {
    font-size: 12.5px !important;
  }

  .pts-badge {
    padding: 3px 6px !important;
    font-size: 11px !important;
  }
}



/* ==========================================================================
   REAL-TIME TIMELINE HABIT DOTS & DYNAMIC PROGRESS STYLING
   ========================================================================== */
.day-btn .day-status-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.22) !important;
  display: inline-block !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-top: 4px !important;
}

.day-btn .day-status-dot.dot-partial,
.day-btn.in-progress .day-status-dot {
  background: #F59E0B !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8) !important;
}

.day-btn .day-status-dot.dot-completed,
.day-btn.completed .day-status-dot {
  background: #10B981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9) !important;
}

.day-btn.active.completed .day-status-dot {
  background: #061A14 !important;
  box-shadow: 0 0 6px rgba(6, 26, 20, 0.8) !important;
}

.day-btn.active.in-progress .day-status-dot {
  background: #061A14 !important;
  box-shadow: 0 0 6px rgba(6, 26, 20, 0.8) !important;
}

body.light-theme .day-btn .day-status-dot {
  background: rgba(0, 0, 0, 0.18) !important;
}

body.light-theme .day-btn .day-status-dot.dot-partial,
body.light-theme .day-btn.in-progress .day-status-dot {
  background: #D97706 !important;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.6) !important;
}

body.light-theme .day-btn .day-status-dot.dot-completed,
body.light-theme .day-btn.completed .day-status-dot {
  background: #059669 !important;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.6) !important;
}



/* ==========================================================================
   HABIT CARDS & TIMELINE SLOTS REAL-TIME ACTIVE/COMPLETED GLOW
   ========================================================================== */
.habit-overview-pill {
  cursor: pointer !important;
  user-select: none !important;
}

.habit-overview-pill.completed,
.habit-overview-pill.active-card {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.7) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-2px) !important;
}

.habit-overview-pill.completed .habit-num-tag,
.habit-overview-pill.active-card .habit-num-tag {
  background: #10B981 !important;
  color: #061A14 !important;
  font-weight: 800 !important;
}

.habit-overview-pill.completed .habit-name,
.habit-overview-pill.active-card .habit-name {
  color: #34D399 !important;
}

.habit-standalone-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.habit-standalone-card.completed,
.habit-standalone-card.active-card {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.22) !important;
}

.habit-standalone-card.completed .habit-standalone-num,
.habit-standalone-card.active-card .habit-standalone-num {
  background: #10B981 !important;
  color: #061A14 !important;
  font-weight: 800 !important;
}

.habit-standalone-card.completed .habit-standalone-title,
.habit-standalone-card.active-card .habit-standalone-title {
  color: #34D399 !important;
}

.habit-standalone-card.completed .habit-standalone-pts,
.habit-standalone-card.active-card .habit-standalone-pts {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #10B981 !important;
}

.suggested-meal-box.timeline-slot,
.suggested-meal-box {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.suggested-meal-box.completed,
.suggested-meal-box.active-card,
.suggested-meal-box.slot-completed,
.timeline-slot.completed,
.timeline-slot.active-card,
.timeline-slot.slot-completed {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25) !important;
}

.suggested-meal-box.completed .meal-slot-badge,
.timeline-slot.completed .meal-slot-badge {
  background: #10B981 !important;
  color: #061A14 !important;
  font-weight: 800 !important;
}

body.light-theme .habit-overview-pill.completed {
  background: #ECFDF5 !important;
  border-color: #10B981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15) !important;
}

body.light-theme .habit-standalone-card.completed {
  background: #F0FDF4 !important;
  border-color: #10B981 !important;
}

body.light-theme .suggested-meal-box.completed {
  background: #ECFDF5 !important;
  border-color: #10B981 !important;
}



/* ==========================================================================
   PERFECT CIRCULAR PROFILE AVATAR & REMOVED STATUS BADGE
   ========================================================================== */
#header-sync-dot {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#programma-status,
.active-badge.icon-only-badge,
.pulse-dot {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.header-account-btn,
.header-account-pill {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: #0B1120 !important;
  border: 2px solid #10B981 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.header-account-btn:hover,
.header-account-pill:hover {
  transform: translateY(-1px) scale(1.06) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
  border-color: #34D399 !important;
}

#header-user-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0B1120 !important;
}

.header-avatar-img,
#header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}



/* ==========================================================================
   SQUIRCLE FULL-BLEED PROFILE AVATAR (FILLS ROUNDED SQUARE CONTAINER)
   ========================================================================== */
.header-account-btn,
.header-account-pill {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 12px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: #0B1120 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.5) !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.header-account-btn:hover,
.header-account-pill:hover {
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
  border-color: #10B981 !important;
}

#header-user-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0B1120 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.header-avatar-img,
#header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block !important;
  transform: scale(1.06) !important; /* Edge-to-edge perfect bleed */
  padding: 0 !important;
  margin: 0 !important;
}



/* ==========================================================================
   REMOVE ALL SHADOWS FROM COMMUNITY CHANNELS DRAWER / SIDEBAR
   ========================================================================== */
.community-channels-sidebar,
#community-channels-sidebar {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

@media (max-width: 992px) {
  .community-channels-sidebar,
  #community-channels-sidebar {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .community-channels-sidebar.mobile-open {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
  }
}



/* ==========================================================================
   PROGRESS & REPORT SUB-NAV (IDENTICAL METHOD & STYLE TO PROFILE SUB-NAV)
   ========================================================================== */
.progress-subnav-container,
#progress-subnav-bar {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 18px !important;
  padding: 6px !important;
  margin-bottom: 20px !important;
  overflow: visible !important;
}

@media (max-width: 768px) {
  .progress-subnav-container,
  #progress-subnav-bar {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    width: 100% !important;
  }
}

.progress-subnav-container .progress-subnav-btn,
#progress-subnav-bar .progress-subnav-btn {
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.progress-subnav-container .progress-subnav-btn.active,
#progress-subnav-bar .progress-subnav-btn.active {
  background: #10B981 !important;
  color: #042F2E !important;
  font-weight: 800 !important;
  border: 1px solid #10B981 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.progress-subnav-container .progress-subnav-btn:not(.active),
#progress-subnav-bar .progress-subnav-btn:not(.active) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.progress-subnav-container .progress-subnav-btn:not(.active):hover,
.progress-subnav-container .progress-subnav-btn:not(.active):active,
#progress-subnav-bar .progress-subnav-btn:not(.active):hover,
#progress-subnav-bar .progress-subnav-btn:not(.active):active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.light-theme .progress-subnav-container,
body.light-theme #progress-subnav-bar {
  background: #EEF2F6 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .progress-subnav-container .progress-subnav-btn:not(.active),
body.light-theme #progress-subnav-bar .progress-subnav-btn:not(.active) {
  background: #FFFFFF !important;
  color: #475569 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .progress-subnav-container .progress-subnav-btn.active,
body.light-theme #progress-subnav-bar .progress-subnav-btn.active {
  background: #10B981 !important;
  color: #FFFFFF !important;
}



/* ==========================================================================
   SOLID VIBRANT RED SIDEBAR LOGOUT BUTTON
   ========================================================================== */
.sidebar-logout-btn,
#sidebar-logout-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 11px 16px !important;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
  border: 1px solid #EF4444 !important;
  border-radius: 12px !important;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

.sidebar-logout-btn:hover,
#sidebar-logout-btn:hover {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  color: #FFFFFF !important;
  border-color: #F87171 !important;
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5) !important;
}

.sidebar-logout-btn:active,
#sidebar-logout-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

.sidebar-logout-btn .logout-icon {
  font-size: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.light-theme .sidebar-logout-btn,
body.light-theme #sidebar-logout-btn {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}

body.light-theme .sidebar-logout-btn:hover,
body.light-theme #sidebar-logout-btn:hover {
  background: linear-gradient(135deg, #F87171 0%, #EF4444 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45) !important;
}



/* ==========================================================================
   HIDE WATER 250ML BUTTONS IN HABIT 2
   ========================================================================== */
.water-controls,
#btn-water-minus,
#btn-water-plus {
  display: none !important;
  visibility: hidden !important;
}



/* ==========================================================================
   DESKTOP VS MOBILE BOTTOM NAVIGATION DOCK RESPONSIVENESS
   ========================================================================== */

/* 1. Desktop Mode (min-width: 1025px): Strictly HIDE bottom menu toolbar */
@media screen and (min-width: 1025px) {
  .bottom-nav,
  #app-bottom-nav,
  nav.bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    z-index: -1 !important;
  }
}

/* 2. Mobile Mode (max-width: 1024px): SHOW bottom menu icons toolbar */
@media screen and (max-width: 1024px) {
  .bottom-nav,
  #app-bottom-nav,
  nav.bottom-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(58px + var(--safe-bottom)) !important;
    padding: 0 6px var(--safe-bottom) 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 4px !important;
    background: rgba(10, 15, 29, 0.95) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   DYNAMIC GOAL SELECTION & GOAL-DRIVEN PARADIGM STYLES
   ========================================================================== */

.goal-selection-container {
  margin-bottom: 22px;
}

.goal-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.goal-card-option {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 16px 18px;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  overflow: hidden;
  text-align: left;
}

.goal-card-option:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.goal-card-option.selected,
.goal-card-option.active {
  border-color: #10B981 !important;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 78, 59, 0.3) 100%) !important;
  box-shadow: 0 0 0 1px #10B981, 0 10px 30px rgba(16, 185, 129, 0.25) !important;
}

.goal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.goal-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.2s ease;
}

.goal-card-option.selected .goal-card-icon-wrap {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10B981;
  transform: scale(1.06);
}

.goal-card-check-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: transparent;
  transition: all 0.2s ease;
}

.goal-card-option.selected .goal-card-check-indicator {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.goal-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.2px;
}

.goal-card-desc {
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.45;
  margin: 0 0 14px 0;
  flex: 1;
}

.goal-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.goal-tag-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.goal-card-option.selected .goal-tag-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Light Theme Goal Card Styles */
body.light-theme .goal-card-option {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.light-theme .goal-card-option:hover {
  background: #F0FDF4;
  border-color: #10B981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

body.light-theme .goal-card-option.selected,
body.light-theme .goal-card-option.active {
  background: linear-gradient(145deg, #ECFDF5 0%, #D1FAE5 100%) !important;
  border-color: #059669 !important;
  box-shadow: 0 0 0 1px #059669, 0 8px 24px rgba(5, 150, 105, 0.18) !important;
}

body.light-theme .goal-card-title {
  color: #0F172A;
}

body.light-theme .goal-card-desc {
  color: #475569;
}

body.light-theme .goal-card-icon-wrap {
  background: #F1F5F9;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .goal-card-option.selected .goal-card-icon-wrap {
  background: #D1FAE5;
  border-color: #059669;
}

body.light-theme .goal-tag-pill {
  background: #F1F5F9;
  color: #475569;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .goal-card-option.selected .goal-tag-pill {
  background: #D1FAE5;
  color: #047857;
  border-color: rgba(5, 150, 105, 0.3);
}

/* Goal Badge in Headers and Timeline */
.active-goal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10B981;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-goal-badge-pill:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10B981;
  transform: translateY(-1px);
}

body.light-theme .active-goal-badge-pill {
  background: #ECFDF5;
  border-color: #10B981;
  color: #047857;
}

/* Dedicated Goal Selection Modal */
.goal-modal-card {
  max-width: 680px !important;
  width: 92% !important;
  padding: 28px 24px !important;
  border-radius: 24px !important;
  background: #111827 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}

body.light-theme .goal-modal-card {
  background: #FFFFFF !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2) !important;
}



/* ==========================================
   WORKOUT & VIDEO HUB STYLES
   ========================================== */

.btn-goto-workouts {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-weight: 700;
  font-size: 13px;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-goto-workouts:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.workout-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.workout-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 15px rgba(59, 130, 246, 0.2);
}

.workout-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1329;
  overflow: hidden;
}

.workout-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.workout-card:hover .workout-thumbnail-img {
  transform: scale(1.05);
}

.workout-play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.workout-card:hover .workout-play-btn-overlay {
  background: #10B981;
  transform: translate(-50%, -50%) scale(1.12);
}

.workout-duration-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.workout-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.workout-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.workout-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.workout-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.workout-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
}

/* Meals Subfilters Bar */
.meals-subfilters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 4px 2px;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.meals-subfilters-bar::-webkit-scrollbar {
  display: none;
}

.meal-subtab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meal-subtab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.meal-subtab-btn.active {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: #34D399;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

body.light-theme .meal-subtab-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #475569;
}

body.light-theme .meal-subtab-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

body.light-theme .meal-subtab-btn.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #059669;
  color: #FFFFFF;
}

/* Workout Subfilters Bar */
.workout-subfilters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 4px 2px;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.workout-subfilters-bar::-webkit-scrollbar {
  display: none;
}

.workout-subtab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workout-subtab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.workout-subtab-btn.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  border-color: #60A5FA;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

body.light-theme .workout-subtab-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #475569;
}

body.light-theme .workout-subtab-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

body.light-theme .workout-subtab-btn.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border-color: #2563EB;
  color: #FFFFFF;
}

/* Modal Video Player */
.workout-modal-card {
  max-width: 650px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.workout-video-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.workout-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.workout-stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workout-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.workout-stat-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.workout-exercises-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.workout-exercises-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.workout-exercises-list li {
  margin-bottom: 4px;
}

.workout-nutrition-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 14px;
}

/* Light Theme Adaptations */
body.light-theme .workout-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

body.light-theme .workout-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

body.light-theme .workout-stat-item,
body.light-theme .workout-exercises-box {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

body.light-theme .workout-modal-card {
  background: #FFFFFF;
  color: #0F172A;
}

body.light-theme .btn-goto-workouts {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563eb;
}


/* ==========================================================================
   COACH GUIDES & DAILY FOCUS BANNER ("PERCHÉ È IMPORTANTE")
   ========================================================================== */

.daily-coach-focus-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.daily-coach-focus-card:hover {
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

.focus-card-left {
  flex: 1;
  min-width: 0;
}

.focus-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.focus-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
}

.focus-card-desc {
  margin: 0;
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.4;
}

.btn-read-focus-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-read-focus-guide:hover {
  background: #059669;
  transform: scale(1.03);
}

/* Coach Guide Card in Ricette & Consigli Grid */
.coach-guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.coach-guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.coach-guide-card-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.coach-guide-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.coach-guide-tag-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  color: #FFFFFF;
}

.coach-guide-card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.coach-guide-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}

.coach-guide-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.coach-guide-key-points {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.coach-guide-key-points li {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.coach-guide-key-points li::before {
  content: "✓";
  color: #10B981;
  font-weight: 900;
}

.coach-guide-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-open-guide-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.coach-guide-card:hover .btn-open-guide-card {
  background: #3B82F6;
  color: #FFFFFF;
  border-color: #3B82F6;
}

/* Modal Reading View for Coach Guides */
.coach-guide-modal-card {
  max-width: 640px !important;
  width: 92% !important;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 24px 24px;
  border-radius: 20px;
  background: #111827 !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
  position: relative;
}

body.light-theme .coach-guide-modal-card {
  background: #FFFFFF !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}

.coach-guide-modal-header {
  margin-bottom: 20px;
}

.guide-modal-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
  margin: 8px 0 8px;
}

.guide-modal-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.coach-guide-modal-body {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}

.guide-section-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.guide-section-heading {
  font-size: 15px;
  font-weight: 800;
  color: #10B981;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-bullets-list {
  margin: 0;
  padding-left: 20px;
}

.guide-bullets-list li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.guide-callout-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text);
}

.guide-challenge-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
}

/* Light theme overrides */
body.light-theme .daily-coach-focus-card {
  background: #F0FDF4;
  border-color: #BBF7D0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
body.light-theme .focus-card-title {
  color: #0F172A;
}
body.light-theme .focus-card-desc {
  color: #475569;
}
body.light-theme .guide-section-block {
  background: #F8FAFC;
  border-color: #E2E8F0;
}
body.light-theme .btn-open-guide-card {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
}


/* ==========================================================================
   RECIPE CARD REALISTIC PHOTO HEADER & BADGE SYSTEM
   ========================================================================== */

.recipe-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.28s !important;
  position: relative !important;
}

.recipe-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

body.light-theme .recipe-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .recipe-card:hover {
  border-color: #10B981 !important;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.15) !important;
}

.recipe-thumbnail-wrap {
  position: relative !important;
  width: 100% !important;
  height: 190px !important;
  overflow: hidden !important;
  background: #0B0F19 !important;
}

.recipe-thumbnail-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.recipe-card:hover .recipe-thumbnail-img {
  transform: scale(1.08) !important;
}

.recipe-thumbnail-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.05) 50%, rgba(11, 15, 25, 0.95) 100%) !important;
  pointer-events: none !important;
}

body.light-theme .recipe-thumbnail-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.05) 55%, rgba(255, 255, 255, 0.95) 100%) !important;
}

.recipe-top-badges {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.recipe-pill-slot {
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  padding: 5px 11px !important;
  border-radius: 20px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.recipe-pill-goal {
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.recipe-pill-goal.goal-massa {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
}

.recipe-pill-goal.goal-energia {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4) !important;
}

.recipe-bottom-meta-overlay {
  position: absolute !important;
  bottom: 10px !important;
  left: 12px !important;
  right: 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.recipe-pill-meta {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.recipe-header {
  padding: 18px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  min-height: 80px !important;
  box-sizing: border-box !important;
}

.recipe-icon-wrap {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.recipe-category-badge {
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: #FFFFFF !important;
  backdrop-filter: blur(4px) !important;
}

/* ============================================================
   PACKAGES MODULE (BRONZE, SILVER, GOLD PRICING SYSTEM)
   ============================================================ */

.active-package-badge-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #10B981 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.active-package-badge-pill:hover {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10B981 !important;
  transform: translateY(-1px) !important;
}

.packages-page-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 0 30px;
}

.packages-header-hero {
  text-align: center;
  margin-bottom: 28px;
}

.packages-hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 10px;
}

.packages-main-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.packages-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

.active-package-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12.5px;
}

.active-package-status-bar .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

.active-package-status-bar .status-label {
  color: var(--text-muted);
}

.active-package-status-bar .status-name {
  color: #34D399;
  font-weight: 800;
}

/* Packages Grid: 3-column desktop */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
  align-items: stretch;
}

/* Base Package Card */
.package-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.package-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

body.light-theme .package-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* 1. BRONZE TIER CARD */
.package-card-bronze {
  border-top: 3px solid #CD7F32;
}

.package-card-bronze .package-tier-title {
  color: #CD7F32;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.package-card-bronze .package-changes-title {
  color: #CD7F32;
}

/* 2. SILVER TIER CARD (FEATURED / IL PIÙ SCELTO — MOSS GREEN HERO) */
.package-card-silver.silver-featured {
  background: #253323 !important; /* Authentic dark moss green from user screenshot */
  border: 2px solid #5C7A4A !important;
  color: #FFFFFF !important;
  box-shadow: 0 12px 35px rgba(37, 51, 35, 0.5) !important;
  transform: scale(1.02);
}

.package-card-silver.silver-featured:hover {
  transform: scale(1.02) translateY(-3px);
}

body.light-theme .package-card-silver.silver-featured {
  background: #283726 !important;
  color: #FFFFFF !important;
  border-color: #5C7A4A !important;
}

.package-featured-badge {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #E2D3B3; /* Sand / Gold tint */
  margin-bottom: 8px;
}

.package-card-silver .package-plan-name {
  color: #FFFFFF !important;
}

.package-card-silver .package-service-included {
  color: #E2E8F0 !important;
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

.package-card-silver .package-changes-title {
  color: #D5C7AA !important;
}

.package-card-silver .package-features-list {
  color: #F1F5F9 !important;
}

.package-card-silver .package-price-currency,
.package-card-silver .package-price-amount {
  color: #FFFFFF !important;
}

/* 3. GOLD TIER CARD */
.package-card-gold {
  border-top: 3px solid #F59E0B;
}

.package-card-gold .package-tier-title {
  color: #F59E0B;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.package-card-gold .package-changes-title {
  color: #F59E0B;
}

/* Card Common Elements */
.package-card-header {
  margin-bottom: 8px;
}

.package-plan-name {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  font-family: 'Outfit', 'Montserrat', sans-serif;
}

.package-service-included {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .package-card:not(.silver-featured) .package-service-included {
  border-bottom-color: #E2E8F0;
  color: #0F172A;
}

.package-divider {
  height: 1px;
  background: transparent;
  margin: 0;
}

.package-changes-section {
  flex: 1;
  margin: 14px 0 20px;
}

.package-changes-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 12px;
}

.package-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

body.light-theme .package-card:not(.silver-featured) .package-features-list li {
  color: #334155;
}

.package-features-list .feature-bullet {
  font-weight: 900;
  color: var(--text-muted);
}

.package-card-silver .package-features-list .feature-bullet {
  color: #A3B899;
}

.package-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .package-card:not(.silver-featured) .package-footer {
  border-top-color: #E2E8F0;
}

.package-price-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 14px;
}

.package-price-currency {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.package-price-amount {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  font-family: 'Outfit', 'Montserrat', sans-serif;
  letter-spacing: -0.5px;
}

/* Package CTA Buttons */
.package-select-btn {
  width: 100% !important;
  padding: 13px 16px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

/* Bronze button: Dark sleek */
.btn-package-bronze {
  background: #1E293B !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.btn-package-bronze:hover {
  background: #334155 !important;
  transform: translateY(-1px) !important;
}

/* Silver button: Sand/Tan warm accent from screenshot */
.btn-package-silver {
  background: #CFC2AA !important;
  color: #1F2A1C !important;
  border: 1px solid #D5C7AA !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  font-weight: 900 !important;
}

.btn-package-silver:hover {
  background: #DDD1BC !important;
  transform: translateY(-1px) !important;
}

/* Gold button: Dark sleek */
.btn-package-gold {
  background: #1E293B !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.btn-package-gold:hover {
  background: #334155 !important;
  transform: translateY(-1px) !important;
}

/* Active Selected Card Glow indicator */
.package-card.selected {
  outline: 2px solid #10B981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.package-card.selected::before {
  content: '✓ SELEZIONATO';
  position: absolute;
  top: -11px;
  right: 18px;
  background: #10B981;
  color: #061A14;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.packages-guarantee-note {
  text-align: center;
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Modal Specific Adjustments */
.packages-modal-card {
  max-width: 1060px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 22px;
}

.modal-packages-grid {
  margin-top: 10px;
}

/* Responsive Breakpoints for Mobile */
@media (max-width: 960px) {
  .packages-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .package-card-silver.silver-featured {
    transform: none;
  }
  
  .package-card-silver.silver-featured:hover {
    transform: translateY(-2px);
  }
}

/* Package Presentation Video Trigger Button */
.btn-watch-package-video {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34D399;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.btn-watch-package-video:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10B981;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-watch-package-video .play-icon-triangle {
  font-size: 11px;
  background: #10B981;
  color: #0F172A;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 2px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

/* COACH TIP CAROUSEL ENHANCEMENT */
.top-coach-tip-card {
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tip-carousel-controls {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-tip-nav {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #F8FAFC !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.btn-tip-nav:hover {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #0F172A !important;
  transform: scale(1.12) !important;
}

body.light-theme .btn-tip-nav {
  background: rgba(0, 0, 0, 0.07) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1E293B !important;
}

body.light-theme .btn-tip-nav:hover {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
}

.daily-tip-slide-wrap {
  min-height: 48px !important;
  transition: opacity 0.22s ease, transform 0.22s ease !important;
}

.daily-tip-slide-wrap.slide-fade {
  opacity: 0 !important;
  transform: translateY(4px) !important;
}

.tip-carousel-dots {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.tip-carousel-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  border: none !important;
}

.tip-carousel-dot.active {
  width: 18px !important;
  border-radius: 4px !important;
  background: #10B981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

body.light-theme .tip-carousel-dot {
  background: rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .tip-carousel-dot.active {
  background: #059669 !important;
}

