/* ═══════════════════════════════════════════════════════
   BE BETTER CO. — Design System
   Mobile-first premium dark theme
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --teal: #1A8A6E;
  --teal-dark: #0D5C49;
  --teal-light: #2EC4A3;
  --teal-pale: #E6F7F4;
  --amber: #F4A623;
  --amber-dark: #D4881A;
  --white: #FFFFFF;
  --off-white: #F9FAFB;
  --light: #F3F4F6;
  --mid: #9CA3AF;
  --body: #374151;
  --dark: #111827;
  --dark-bg: #0F1923;
  --dark-card: #1A2535;
  --dark-surface: #232C3D;
  --red: #EF4444;
  --green: #10B981;
  --purple: #8B5CF6;
  --blue: #3B82F6;

  --font-heading: 'Bebas Neue', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-ui: 'DM Sans', sans-serif;

  --sidebar-width: 260px;
  --bottom-nav-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 100px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #080E18;
  font-family: var(--font-body);
  color: var(--white);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal-light);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

img {
  max-width: 100%;
  height: auto;
}

/* ═══════════════════════════
   MOBILE-FIRST LAYOUT
   ═══════════════════════════ */

/* ── App Layout ── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── MOBILE TOP BAR ── */
.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 25, 35, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 90;
}

.mobile-topbar .topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-topbar .topbar-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(26, 138, 110, 0.3);
}

.mobile-topbar .topbar-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #2EC4A3, #1A8A6E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-topbar .topbar-user {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

/* ── BOTTOM NAVIGATION (Mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 25, 35, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  padding-bottom: calc(6px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  min-width: 56px;
  position: relative;
}

.bottom-nav-item .nav-ico {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}

.bottom-nav-item.active {
  color: var(--teal-light);
}

.bottom-nav-item.active .nav-ico {
  transform: scale(1.15);
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--teal-light);
  border-radius: 0 0 4px 4px;
}

.bottom-nav-item:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── SIDEBAR (hidden on mobile, shown on desktop) ── */
.sidebar {
  display: none;
  width: var(--sidebar-width);
  background: rgba(15, 25, 35, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  flex-direction: column;
  padding: 24px 16px;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* Sidebar overlay for mobile slide-in */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar.mobile-open {
  display: flex;
  transform: translateX(0);
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
}

.sidebar-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(26, 138, 110, 0.3);
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #2EC4A3, #1A8A6E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2px;
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.nav-link.active {
  background: rgba(26, 138, 110, 0.15);
  color: var(--teal-light);
  font-weight: 600;
}

.nav-link .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  margin-top: 16px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 10px;
  color: var(--mid);
  text-transform: capitalize;
}

/* ── Main Content (mobile-first) ── */
.main-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(24px + var(--bottom-nav-height) + var(--safe-bottom));
  min-height: 100vh;
  min-height: 100dvh;
}

.page-header-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.page-subtitle {
  font-size: 12px;
  color: var(--mid);
  margin-top: 2px;
}

/* ═══════════════════════════
   CARDS
   ═══════════════════════════ */
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.card-subtitle {
  font-size: 11px;
  color: var(--mid);
  margin-top: 2px;
}

/* ═══════════════════════════
   STATS / KPI CARDS
   ═══════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.stat-card .stat-icon.teal {
  background: rgba(26, 138, 110, 0.2);
}

.stat-card .stat-icon.amber {
  background: rgba(244, 166, 35, 0.2);
}

.stat-card .stat-icon.purple {
  background: rgba(139, 92, 246, 0.2);
}

.stat-card .stat-icon.blue {
  background: rgba(59, 130, 246, 0.2);
}

.stat-card .stat-icon.red {
  background: rgba(239, 68, 68, 0.15);
}

.stat-card .stat-icon.green {
  background: rgba(16, 185, 129, 0.2);
}

.stat-card .stat-value {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--mid);
  margin-top: 4px;
}

.stat-card .stat-trend {
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
}

.stat-trend.up {
  color: var(--green);
}

.stat-trend.down {
  color: var(--red);
}

/* ── Gradient Stats Banner ── */
.stats-card-gradient {
  background: linear-gradient(135deg, rgba(13, 92, 73, 0.7) 0%, rgba(26, 37, 53, 0.9) 100%);
  border: 1px solid rgba(26, 138, 110, 0.3);
  border-radius: var(--radius-xl);
  padding: 16px;
}

/* ═══════════════════════════
   BUTTONS (touch-friendly)
   ═══════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  color: white;
  box-shadow: 0 8px 24px rgba(26, 138, 110, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(26, 138, 110, 0.6);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  min-height: 40px;
}

/* ═══════════════════════════
   FORM INPUTS (touch-friendly)
   ═══════════════════════════ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  /* Prevents iOS zoom */
  color: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  min-height: 48px;
}

.form-control:focus {
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(46, 196, 163, 0.15);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: #1A2535;
  padding-right: 36px;
  color: #FFFFFF;
  cursor: pointer;
}

/* Fix native option dropdown colors — browsers don't inherit dark theme */
select.form-control option {
  background-color: #1A2535;
  color: #FFFFFF;
}

select.form-control option:hover,
select.form-control option:checked {
  background-color: #1A8A6E;
  color: #FFFFFF;
}

select.form-control optgroup {
  background-color: #0F1923;
  color: #9CA3AF;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.form-text {
  font-size: 11px;
  color: var(--mid);
  margin-top: 4px;
}

.form-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
}

/* ═══════════════════════════
   BADGES & PILLS
   ═══════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.badge-teal {
  background: rgba(26, 138, 110, 0.2);
  color: var(--teal-light);
  border: 1px solid rgba(26, 138, 110, 0.3);
}

.badge-amber {
  background: rgba(244, 166, 35, 0.15);
  color: var(--amber);
  border: 1px solid rgba(244, 166, 35, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.status-pill.pending {
  background: rgba(244, 166, 35, 0.15);
  color: var(--amber);
}

.status-pill.inactive {
  background: rgba(156, 163, 175, 0.15);
  color: var(--mid);
}

.status-pill.banned {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.status-pill.draft {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

/* ═══════════════════════════
   TABLES (swipe-friendly)
   ═══════════════════════════ */
.table-wrap {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.data-table th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--mid);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table td.name {
  color: var(--white);
  font-weight: 600;
}

/* ═══════════════════════════
   MEAL ACCORDION
   ═══════════════════════════ */
.meal-accordion {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
}

.meal-acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.meal-acc-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.meal-acc-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.meal-acc-time {
  font-size: 11px;
  color: var(--mid);
  margin-left: auto;
  margin-right: 12px;
  white-space: nowrap;
}

.meal-acc-body {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 16px;
}

.meal-food-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 8px;
}

.meal-food-item:last-child {
  border-bottom: none;
}

.food-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
  min-width: 0;
}

.food-quantity {
  font-size: 12px;
  color: var(--teal-light);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.supplement-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.supplement-pill {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 11px;
  color: #C4B5FD;
  font-weight: 600;
}

/* ═══════════════════════════
   CHECK-IN COMPONENTS
   ═══════════════════════════ */
.mood-selector {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mood-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mood-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mood-btn.active {
  background: rgba(26, 138, 110, 0.25);
  border-color: var(--teal-light);
  transform: scale(1.1);
}

.water-tracker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.water-drop {
  font-size: 26px;
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.water-drop.filled {
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(46, 196, 163, 0.5));
}

.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-fill.teal {
  background: linear-gradient(90deg, var(--teal-light), var(--teal));
}

.progress-fill.amber {
  background: linear-gradient(90deg, #FCD34D, var(--amber));
}

.progress-fill.blue {
  background: linear-gradient(90deg, #60A5FA, var(--blue));
}

.progress-fill.purple {
  background: linear-gradient(90deg, #C4B5FD, var(--purple));
}

/* ═══════════════════════════
   EMPTY STATES
   ═══════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state .empty-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.empty-state .empty-text {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 16px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════
   ALERTS
   ═══════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
  background: rgba(244, 166, 35, 0.15);
  color: var(--amber);
  border: 1px solid rgba(244, 166, 35, 0.3);
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ═══════════════════════════
   PHOTO UPLOAD (touch)
   ═══════════════════════════ */
.photo-upload-zone {
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.photo-upload-zone:hover {
  border-color: var(--teal-light);
  background: rgba(26, 138, 110, 0.05);
}

.photo-upload-zone .upload-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.photo-upload-zone .upload-text {
  font-size: 13px;
  color: var(--mid);
}

.photo-upload-zone .upload-hint {
  font-size: 11px;
  color: var(--teal-light);
  margin-top: 4px;
}

/* ═══════════════════════════
   TABS
   ═══════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 0;
}

.tab.active {
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  color: var(--white);
}

.tab:hover:not(.active) {
  color: var(--white);
}

/* ═══════════════════════════
   CHARTS
   ═══════════════════════════ */
.chart-container {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ═══════════════════════════
   MACRO BARS
   ═══════════════════════════ */
.macro-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.macro-label {
  font-size: 11px;
  color: var(--mid);
  width: 50px;
  font-weight: 500;
}

.macro-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.macro-bar-bg .macro-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.macro-fill.protein {
  background: linear-gradient(90deg, #60A5FA, #3B82F6);
}

.macro-fill.carbs {
  background: linear-gradient(90deg, #FCD34D, #F59E0B);
}

.macro-fill.fat {
  background: linear-gradient(90deg, #C4B5FD, #8B5CF6);
}

.macro-value {
  font-size: 11px;
  color: var(--white);
  font-weight: 600;
  width: 45px;
  text-align: right;
}

/* ═══════════════════════════
   AUTH PAGES
   ═══════════════════════════ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26, 138, 110, 0.2) 0%, transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 25, 35, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
  box-shadow: 0 12px 40px rgba(26, 138, 110, 0.4);
}

.auth-logo h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #2EC4A3, #1A8A6E, #F4A623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  font-size: 13px;
  color: var(--mid);
  margin-top: 4px;
}

.auth-form h2 {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.auth-form .auth-subtitle {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  font-size: 11px;
  color: var(--mid);
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--mid);
}

.auth-footer a {
  color: var(--teal-light);
  font-weight: 700;
}

/* ═══════════════════════════
   CLIENT CARDS
   ═══════════════════════════ */
.client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.client-card:hover {
  border-color: rgba(26, 138, 110, 0.3);
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}

.client-meta {
  font-size: 11px;
  color: var(--mid);
  margin-top: 2px;
}

/* ═══════════════════════════
   MOBILE-SPECIFIC COMPONENTS
   ═══════════════════════════ */

/* Quick action buttons (FAB-style) */
.fab-btn {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  right: 16px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 8px 32px rgba(26, 138, 110, 0.5);
  z-index: 80;
  text-decoration: none;
  transition: transform 0.2s;
}

.fab-btn:hover,
.fab-btn:active {
  transform: scale(1.1);
  color: white;
}

/* Swipeable cards scrolling */
.scroll-x {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar {
  display: none;
}

.scroll-x>.card,
.scroll-x>.stat-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 240px;
}

/* ═══════════════════════════
   UTILITIES (mobile-first)
   ═══════════════════════════ */
.text-teal {
  color: var(--teal-light);
}

.text-amber {
  color: var(--amber);
}

.text-red {
  color: var(--red);
}

.text-green {
  color: var(--green);
}

.text-mid {
  color: var(--mid);
}

.text-white {
  color: var(--white);
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

.flex-1 {
  flex: 1;
}

.flex-wrap {
  flex-wrap: wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Hide on mobile */
.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

/* ═══════════════════════════
   SCROLLBAR
   ═══════════════════════════ */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════
   ANIMATIONS
   ═══════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.animate-in {
  animation: fadeIn 0.35s ease both;
}

.animate-in-delay-1 {
  animation-delay: 0.08s;
}

.animate-in-delay-2 {
  animation-delay: 0.16s;
}

.animate-in-delay-3 {
  animation-delay: 0.24s;
}

.animate-in-delay-4 {
  animation-delay: 0.32s;
}

/* ═══════════════════════════
   TABLET BREAKPOINT (min 600px)
   ═══════════════════════════ */
@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    gap: 14px;
  }

  .card {
    padding: 20px;
  }

  .stat-card {
    padding: 18px;
  }

  .main-content {
    padding: 20px;
    padding-bottom: calc(24px + var(--bottom-nav-height));
  }

  .page-title {
    font-size: 22px;
  }

  .page-header-bar {
    flex-direction: row;
    align-items: center;
  }

  .auth-card {
    padding: 36px;
  }
}

/* ═══════════════════════════
   DESKTOP BREAKPOINT (min 1024px)
   ═══════════════════════════ */
@media (min-width: 1024px) {

  /* Show sidebar, hide bottom nav and top bar */
  .sidebar {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  .mobile-topbar {
    display: none;
  }

  .main-content {
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    padding-bottom: 40px;
  }

  .page-title {
    font-size: 24px;
  }

  .card {
    padding: 24px;
  }

  .stat-card .stat-value {
    font-size: 28px;
  }

  .stat-card .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }

  .form-control {
    font-size: 14px;
    padding: 12px 16px;
    min-height: 44px;
  }

  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }

  .fab-btn {
    display: none;
  }

  .auth-card {
    padding: 40px;
  }

  .page-header-bar {
    margin-bottom: 32px;
  }

  .stats-card-gradient {
    padding: 24px;
  }
}

/* ═══════════════════════════
   LARGE DESKTOP (min 1440px)
   ═══════════════════════════ */
@media (min-width: 1440px) {
  .main-content {
    max-width: 1200px;
    padding: 40px 60px;
  }
}