/* ==========================================================================
   ERA Nutrition Management System - Premium Dark Theme & Glassmorphism System
   Palette: Black (#0B0B0B), Dark Charcoal (#121216, #181820), Emerald (#22C55E)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-main: #0b0b0b;
  --bg-secondary: #121216;
  --bg-card: rgba(22, 22, 28, 0.75);
  --bg-card-hover: rgba(28, 28, 36, 0.85);
  --bg-glass-input: rgba(255, 255, 255, 0.04);
  --bg-glass-modal: rgba(14, 14, 18, 0.88);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(34, 197, 94, 0.35);
  --border-focus: rgba(34, 197, 94, 0.6);
  
  --accent-primary: #22c55e;
  --accent-primary-glow: rgba(34, 197, 94, 0.25);
  --accent-primary-dark: #16a34a;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Typography */
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.2);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  
  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  
  --sidebar-width: 260px;
  --header-height: 76px;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Ambient Mesh Glow background */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  right: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  left: -100px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Layout App Container */
#app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition-normal);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

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

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
  background: linear-gradient(90deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 12px 12px 6px 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.nav-item.active {
  color: var(--text-main);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--border-highlight);
  font-weight: 600;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

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

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: var(--transition-fast);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.4);
}

/* Main Workspace Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: rgba(14, 14, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-welcome {
  display: flex;
  flex-direction: column;
}

.welcome-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);

}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

.header-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.header-clock i {
  color: var(--accent-primary);
}

.role-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.role-badge.customer {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-profile-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-profile-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  padding-right: 4px;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* User Profile Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--bg-glass-modal);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 200;
}

.profile-dropdown.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Page Containers */
.content-body {
  padding: 32px;
  flex: 1;
}

.page-view {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 197, 94, 0.08);
}

.goal-card-active {
  background: rgba(34, 197, 94, 0.14) !important;
  border: 1px solid var(--border-highlight) !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.18) !important;
}

/* Stats Grid (9 Dashboard Cards) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.stat-trend.up {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-primary);
}

.stat-trend.neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.stat-icon.green { background: rgba(34, 197, 94, 0.12); color: var(--accent-primary); border: 1px solid rgba(34, 197, 94, 0.2); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.12); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.stat-icon.rose { background: rgba(244, 63, 94, 0.12); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.2); }

/* Dashboard Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.charts-row-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

.chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

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

.btn-primary {
  background: var(--accent-primary);
  color: #052e16;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
  background: #26d865;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.5);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Filter Pills Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-pill.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: var(--border-highlight);
  color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

/* Tables System */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.custom-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.002);
}

.custom-table td {
  padding: 16px 18px;
  vertical-align: middle;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.custom-table td:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  border-left: 1px solid var(--border-subtle);
}

.custom-table td:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  border-right: 1px solid var(--border-subtle);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.inactive {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Food Grid View */
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

.food-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 197, 94, 0.1);
}

.food-card-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  background: #08080a;
  cursor: pointer;
}

.food-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.food-card-img-container:hover .food-card-img {
  transform: scale(1.08);
}

.img-view-pills {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 10;
}

.img-view-btn {
  background: rgba(14, 14, 18, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.img-view-btn:hover, .img-view-btn.active {
  background: var(--accent-primary);
  color: #0b0b0b;
  border-color: var(--accent-primary);
}

.food-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}

.food-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.food-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.food-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.macro-box {
  display: flex;
  flex-direction: column;
}

.macro-box .val {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.macro-box .lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  background: var(--bg-glass-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.form-select option {
  background: #121216;
  color: #fff;
}

/* Customer Portal Dashboard Layout */
.customer-hero {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(18, 18, 22, 0.8) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-item .val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.hero-stat-item .lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meal-logger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.meal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.meal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meal-title-group i {
  color: var(--accent-primary);
}

.meal-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.logged-food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.logged-food-info {
  display: flex;
  flex-direction: column;
}

.logged-food-name {
  font-weight: 600;
}

.logged-food-macros {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Water Hydration Card */
.water-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px;
}

.water-bottle-graphic {
  width: 100px;
  height: 160px;
  border: 3px solid rgba(59, 130, 246, 0.4);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background: rgba(59, 130, 246, 0.05);
}

.water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-header {
    padding: 0 16px;
  }
  .content-body {
    padding: 16px;
  }
  .search-box {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Printable PDF Document Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #pdfPrintModal, #pdfPrintModal *, #pdfPrintModalContent, #pdfPrintModalContent * {
    visibility: visible !important;
  }
  #pdfPrintModal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    box-shadow: none !important;
    border: none !important;
  }
  .no-print, .modal-header, .modal-footer {
    display: none !important;
  }
  #pdfPrintModalContent {
    padding: 0 !important;
    color: #000000 !important;
    background: #ffffff !important;
    max-height: none !important;
  }
}
