/* ─────────────────────────────────────────────────
   NEXORA EVENT DEMO · Premium Light-Mode Design
   April 2026 · Illustrative Demo Data
───────────────────────────────────────────────── */

/* ─── CSS CUSTOM PROPERTIES ─── */
:root {
  --surface-0: #f8f9fc;
  --surface-1: #ffffff;
  --surface-2: #f1f3f8;
  --border: #e5e8f0;
  --border-strong: #d1d5e0;
  --ink-900: #0f1523;
  --ink-700: #2d3348;
  --ink-500: #5c6480;
  --ink-300: #9299b0;
  --ink-100: #c8cdd8;
  --c-blue: #2563eb;
  --c-blue-light: #eff6ff;
  --c-blue-mid: #bfdbfe;
  --c-violet: #7c3aed;
  --c-violet-light: #f5f3ff;
  --c-violet-mid: #ddd6fe;
  --c-teal: #0891b2;
  --c-teal-light: #ecfeff;
  --c-green: #16a34a;
  --c-green-light: #f0fdf4;
  --c-amber: #d97706;
  --c-amber-light: #fffbeb;
  --c-rose: #e11d48;
  --c-rose-light: #fff1f2;
  --nav-h: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-0);
  color: var(--ink-700);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

button { cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }

/* ─────────────────────────────────────────────────
   TOP NAVIGATION
───────────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  gap: 20px;
}

.nav-brand { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 26px; width: auto; object-fit: contain; }
.nav-logo-icon { height: 36px; width: 36px; object-fit: contain; flex-shrink: 0; }

.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs-wrapper::-webkit-scrollbar { display: none; }

.nav-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}
.nav-tab:hover { background: var(--surface-2); color: var(--ink-700); }
.nav-tab.active {
  background: var(--c-blue);
  color: white;
}

.nav-demo-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.live-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
.live-dot.white { background: rgba(255,255,255,0.7); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─────────────────────────────────────────────────
   MAIN CONTENT & TAB PANELS
───────────────────────────────────────────────── */
.main-content {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─────────────────────────────────────────────────
   SHARED COMPONENTS
───────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue);
  margin-bottom: 12px;
}

.overview-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.card-sub { font-size: 12px; color: var(--ink-300); margin-top: 2px; }

/* KPI Grid */
.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.kpi-card.highlight {
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-violet) 100%);
  border-color: transparent;
  color: white;
}
.kpi-card.highlight .kpi-label { color: rgba(255,255,255,0.75); }
.kpi-card.highlight .kpi-delta { color: rgba(255,255,255,0.85); }
.kpi-card.highlight .kpi-val { color: white; }

.kpi-icon {
  font-size: 13px;
  color: var(--ink-300);
  margin-bottom: 10px;
}
.kpi-card.highlight .kpi-icon { color: rgba(255,255,255,0.6); }

.kpi-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.kpi-label { font-size: 12px; color: var(--ink-500); font-weight: 500; margin-bottom: 6px; }
.kpi-delta { font-size: 11px; font-weight: 500; }
.kpi-delta.positive { color: var(--c-green); }
.kpi-delta.negative { color: var(--c-rose); }
.kpi-delta.neutral { color: var(--ink-300); }

/* Buttons */
.btn-primary {
  background: var(--c-blue);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary.sm { padding: 6px 12px; font-size: 12px; }

.btn-ghost {
  background: transparent;
  color: var(--ink-500);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink-700); }
.btn-ghost.sm { padding: 6px 12px; font-size: 12px; }
.btn-ghost.xs { padding: 4px 8px; font-size: 11px; }

.legend-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-500); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.blue { background: var(--c-blue); }
.legend-dot.violet { background: var(--c-violet); }
.legend-dot.green { background: var(--c-green); }
.legend-dot.teal { background: var(--c-teal); }
.legend-dot.amber { background: var(--c-amber); }
.legend-dot.rose { background: var(--c-rose); }

/* Adherence bar */
.adh-bar-wrap { display: flex; align-items: center; gap: 8px; }
.adh-bar-wrap > span { font-size: 12px; font-weight: 600; color: var(--ink-700); min-width: 32px; }
.adh-bar { height: 6px; border-radius: 3px; flex-shrink: 0; min-width: 2px; }

/* Status pills */
.status-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.status-pill.critical { background: var(--c-rose-light); color: var(--c-rose); }
.status-pill.moderate { background: var(--c-amber-light); color: var(--c-amber); }
.status-pill.stabilizing { background: var(--c-teal-light); color: var(--c-teal); }
.status-pill.on-track { background: var(--c-green-light); color: var(--c-green); }

/* Action buttons in table */
.action-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
}
.action-btn.red { background: var(--c-rose-light); color: var(--c-rose); }
.action-btn.amber { background: var(--c-amber-light); color: var(--c-amber); }
.action-btn.teal { background: var(--c-teal-light); color: var(--c-teal); }
.action-btn.ghost { background: var(--surface-2); color: var(--ink-500); }

/* ─────────────────────────────────────────────────
   TAB 1: OVERVIEW
───────────────────────────────────────────────── */
.overview-hero {
  background: linear-gradient(135deg, #0b1225 0%, #112040 55%, #0e1830 100%);
  padding: 64px 48px;
  color: white;
  position: relative;
  overflow: hidden;
}
.overview-hero-inner {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-logo-col {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  /* centered within the right half of the hero */
  -webkit-justify-content: center;
  justify-content: center;
  width: 480px;
}
/* Hero full logo image */
.hero-full-logo {
  width: 420px;
  height: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: screen;
  -webkit-mix-blend-mode: screen;
}

.hero-content { max-width: 680px; }
.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.hero-headline {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.flow-step.active-flow {
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}
.flow-icon { font-size: 13px; }
.flow-arrow { color: rgba(255,255,255,0.3); font-size: 12px; }

.overview-body {
  background: var(--surface-0);
  padding: 40px 48px 48px;
  border-top: 1px solid var(--border);
}
.overview-body-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.overview-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-top: 0;
}

.pillars-list { display: flex; flex-direction: column; gap: 16px; }
.pillar-item { display: flex; align-items: flex-start; gap: 12px; }
.pillar-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.pillar-icon.blue { background: var(--c-blue-light); color: var(--c-blue); }
.pillar-icon.violet { background: var(--c-violet-light); color: var(--c-violet); }
.pillar-icon.teal { background: var(--c-teal-light); color: var(--c-teal); }
.pillar-icon.green { background: var(--c-green-light); color: var(--c-green); }
.pillar-name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.pillar-desc { font-size: 12px; color: var(--ink-300); line-height: 1.5; }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-chip {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-1);
  transition: all 0.15s;
}
.category-chip:hover { border-color: var(--c-blue-mid); color: var(--c-blue); background: var(--c-blue-light); }

/* ─────────────────────────────────────────────────
   TAB 2: MEMBER VIEW
───────────────────────────────────────────────── */
.member-view-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 40px 48px;
  min-height: calc(100vh - var(--nav-h));
  background: var(--surface-0);
  width: 100%;
  box-sizing: border-box;
}

/* ── Left panel ── */
.member-view-left {
  flex: 1;
  max-width: 460px;
}

.context-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.context-desc {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Program selector */
.program-selector { margin-bottom: 24px; }
.program-selector-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  margin-bottom: 10px;
}
.program-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.prog-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface-1);
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.18s ease;
}
.prog-pill:hover { border-color: var(--c-blue-mid); color: var(--c-blue); background: var(--c-blue-light); }
.prog-pill.active { background: var(--c-blue); border-color: var(--c-blue); color: white; }
.prog-pill[data-mode="wellness"].active { background: var(--c-teal); border-color: var(--c-teal); }
.prog-pill[data-mode="recovery"].active { background: var(--c-violet); border-color: var(--c-violet); }
.prog-pill[data-mode="health"].active { background: #0f766e; border-color: #0f766e; }

/* Program context */
.prog-context { display: none; margin-bottom: 20px; }
.prog-context.active { display: block; }
.prog-context-features { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.ctx-feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-700); font-weight: 500; }
.ctx-feature i { color: var(--c-green); font-size: 12px; flex-shrink: 0; }
.prog-context-use {
  font-size: 12px; color: var(--ink-300); padding: 9px 14px;
  background: var(--surface-2); border-radius: var(--radius-sm);
}

.whitelabel-note {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--c-violet-light);
  border: 1px solid var(--c-violet-mid);
  border-radius: var(--radius-md);
  font-size: 12px; color: var(--c-violet); font-weight: 600;
}

/* ── Phone column ── */
.member-view-phone-col {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  flex-grow: 0;
}

/* ─── iPhone 15 Pro Frame ─── */
.iphone-frame {
  width: 300px;
  height: 648px;
  background: #0f0f0f;
  border-radius: 50px;
  padding: 12px;
  position: relative;
  box-shadow:
    0 0 0 1px #2a2a2a,
    0 0 0 2px #0f0f0f,
    0 0 0 3px #3a3a3a,
    0 40px 100px rgba(0,0,0,0.5),
    0 20px 40px rgba(0,0,0,0.3);
}

/* Dynamic Island */
.iphone-island {
  position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 28px;
  background: #0f0f0f;
  border-radius: 20px;
  z-index: 10;
}

.iphone-screen {
  width: 100%;
  height: calc(100% - 18px);
  background: #f5f5f7;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.iphone-home-bar {
  width: 90px; height: 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  margin: 6px auto 0;
}

/* ─── App status bar (iOS native look) ─── */
.app-status-bar-native {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px 0;
  flex-shrink: 0;
  background: transparent;
  position: absolute; top: 12px; left: 12px; right: 12px;
  z-index: 5;
  pointer-events: none;
}
.status-time { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.status-icons { display: flex; gap: 5px; font-size: 10px; color: var(--ink-700); align-items: center; }

/* ─── App Header ─── */
.app-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  padding: 48px 14px 10px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  gap: 4px;
}
/* Left: user avatar */
.app-header-left { display: flex; align-items: center; justify-content: flex-start; }
/* Center: brand — naturally centered by grid */
.app-brand { display: flex; align-items: center; justify-content: center; gap: 6px; }
/* Right: chat shortcut */
.app-header-right { display: flex; align-items: center; justify-content: flex-end; }

.app-brand-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: white; flex-shrink: 0;
}
.app-brand-icon.fitness-icon  { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.app-brand-icon.wellness-icon { background: linear-gradient(135deg, #0891b2, #16a34a); }
.app-brand-icon.recovery-icon { background: linear-gradient(135deg, #7c3aed, #0891b2); }
.app-brand-icon.health-icon   { background: linear-gradient(135deg, #0f766e, #2563eb); }

.app-brand-text { font-size: 13px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.01em; }

.app-icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-500);
  cursor: pointer; position: relative;
}
.app-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ─── App Screens ─── */
.app-screen { display: none; flex: 1; overflow: hidden; min-height: 0; }
.app-screen.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.app-scroll {
  flex: 1; overflow-y: auto;
  padding: 12px 14px 8px;
  scrollbar-width: none;
}
.app-scroll::-webkit-scrollbar { display: none; }
.app-scroll.chat-layout { display: flex; flex-direction: column; padding: 0; }

/* ── Section headers (Apple style) ── */
.app-section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 12px 0 8px;
}
.app-section-title {
  font-size: 13px; font-weight: 700; color: var(--ink-900);
  letter-spacing: -0.01em;
}
.app-section-caption { font-size: 11px; color: var(--c-blue); font-weight: 600; }
.app-page-title {
  font-size: 20px; font-weight: 800; color: var(--ink-900);
  letter-spacing: -0.02em; margin-bottom: 12px;
}

/* ── Hero greeting card ── */
.app-hero-card {
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  color: white;
  position: relative;
  overflow: hidden;
}
.app-hero-card.fitness-hero { background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%); }
.app-hero-card.wellness-hero { background: linear-gradient(135deg, #0e7490 0%, #15803d 100%); }
.app-hero-card.recovery-hero { background: linear-gradient(135deg, #6d28d9 0%, #0e7490 100%); }
.app-hero-card.health-hero { background: linear-gradient(135deg, #0f766e 0%, #1d4ed8 100%); }

.app-hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.app-hero-greeting { font-size: 14px; font-weight: 700; }
.app-hero-sub { font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 2px; }

.app-hero-streak { text-align: center; }
.streak-flame { font-size: 18px; line-height: 1; }
.streak-num { font-size: 18px; font-weight: 800; line-height: 1; }
.streak-label { font-size: 8px; color: rgba(255,255,255,0.7); font-weight: 600; }

/* Activity rings */
.app-rings { display: flex; gap: 16px; justify-content: center; }
.ring-item { display: flex; align-items: center; gap: 8px; }
.ring-svg { width: 40px; height: 40px; }
.ring-label {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.9);
  line-height: 1.3; text-align: left;
}
.ring-label span { font-size: 9px; font-weight: 400; color: rgba(255,255,255,0.6); }

/* ── Today task cards ── */
.app-card-task {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px;
  background: white;
  border-radius: 13px;
  margin-bottom: 7px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.12s ease;
}
.app-card-task.done { opacity: 0.5; }
.app-card-task.active {
  background: var(--c-blue-light);
  box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

.task-left { display: flex; align-items: center; gap: 10px; }
.task-circle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--ink-300); flex-shrink: 0;
  background: white;
}
.task-circle.done { background: var(--c-green); border-color: var(--c-green); color: white; }
.task-circle.active { background: var(--c-blue); border-color: var(--c-blue); color: white; }

.task-name { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.task-sub { font-size: 10px; color: var(--ink-300); }

.task-cta-btn {
  font-size: 11px; font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  border: none; background: var(--c-blue); color: white;
}
.task-cta-btn.ghost { background: var(--surface-2); color: var(--ink-500); }

/* ── Coach card ── */
.app-coach-card {
  background: white; border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 12px;
}
.coach-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; position: relative; }
.coach-card-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.coach-card-name { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.coach-card-role { font-size: 9px; color: var(--ink-300); }
.coach-online-dot {
  width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
  border: 2px solid white; position: absolute; right: 0; top: 0;
}
.coach-card-msg { font-size: 11px; color: var(--ink-700); line-height: 1.55; margin-bottom: 10px; }
.coach-card-reply {
  font-size: 11px; font-weight: 700; color: var(--c-blue);
  background: var(--c-blue-light); border: none;
  padding: 5px 14px; border-radius: 20px; width: 100%;
}

/* ── Week row (Apple style) ── */
.app-week-row { display: flex; gap: 6px; margin-bottom: 12px; }
.week-bubble {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: var(--ink-300);
}
.wb-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-2); border: 1.5px solid var(--border);
}
.week-bubble.done .wb-dot { background: var(--c-green); border-color: var(--c-green); }
.week-bubble.today .wb-dot { background: var(--c-blue); border-color: var(--c-blue); }
.wb-dot.today { background: var(--c-blue); border-color: var(--c-blue); }
.wb-dot.rest { background: var(--surface-0); }
.week-bubble.rest { color: var(--ink-100); }
.week-bubble.today { color: var(--c-blue); }
.week-bubble.done { color: var(--c-green); }

/* ── Plan / Workout screen ── */
.week-selector { display: flex; gap: 5px; margin-bottom: 12px; }
.ws-day {
  flex: 1; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-300);
  border: 1.5px solid var(--border);
}
.ws-day.done { background: var(--c-green-light); color: var(--c-green); border-color: #bbf7d0; }
.ws-day.active { background: var(--c-blue); color: white; border-color: var(--c-blue); box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.ws-day.rest { background: white; color: var(--ink-100); border-color: transparent; }

.session-hero-card {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  border-radius: 16px; padding: 16px 16px 14px;
  margin-bottom: 14px; color: white;
}
.shc-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.shc-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.shc-meta { display: flex; gap: 12px; font-size: 10px; color: rgba(255,255,255,0.75); margin-bottom: 14px; }
.shc-meta span { display: flex; align-items: center; gap: 4px; }
.shc-start-btn {
  width: 100%; padding: 9px;
  background: rgba(255,255,255,0.2); border: 1.5px solid rgba(255,255,255,0.3);
  color: white; border-radius: 10px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.shc-start-btn:hover { background: rgba(255,255,255,0.3); }

.ex-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: white; border-radius: 11px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ex-card.done { opacity: 0.5; }
.ex-card.current { background: var(--c-blue-light); border: 1px solid var(--c-blue-mid); }

.ex-card-num { font-size: 10px; font-weight: 800; color: var(--ink-100); width: 20px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ex-card.current .ex-card-num { color: var(--c-blue); }

.ex-card-info { flex: 1; }
.ex-card-name { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.ex-card-sets { font-size: 10px; color: var(--ink-300); margin-top: 1px; }

.ex-card-status {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; flex-shrink: 0;
  background: var(--surface-2); color: var(--ink-100);
}
.ex-card-status.done { background: var(--c-green); color: white; }
.ex-card-status.current { background: var(--c-blue); color: white; }

.app-care-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: var(--c-blue-light); border-radius: 11px;
  font-size: 11px; color: var(--ink-700); line-height: 1.5; margin-top: 10px;
}
.app-care-note i { color: var(--c-blue); flex-shrink: 0; margin-top: 1px; }

/* ── Nutrition screen ── */
.nutrition-hero {
  display: flex; align-items: center; gap: 16px;
  background: white; border-radius: 16px; padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.macro-donut-app { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.macro-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.macro-kcal { font-size: 16px; font-weight: 800; color: var(--ink-900); line-height: 1; }
.macro-kcal-sub { font-size: 8px; color: var(--ink-300); font-weight: 500; }

.macro-bars { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.macro-bar-row { display: flex; align-items: center; gap: 6px; }
.mb-label { font-size: 9px; font-weight: 700; color: var(--ink-300); width: 36px; flex-shrink: 0; }
.mb-track { flex: 1; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.mb-fill { height: 100%; border-radius: 3px; }
.mb-fill.carbs { background: var(--c-blue); }
.mb-fill.protein { background: var(--c-violet); }
.mb-fill.fat { background: var(--c-amber); }
.mb-val { font-size: 10px; font-weight: 700; color: var(--ink-900); width: 28px; text-align: right; flex-shrink: 0; }

.meal-card {
  display: flex; align-items: center; gap: 10px;
  background: white; border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.meal-card.done { opacity: 0.6; }
.meal-card.active { border: 1.5px solid var(--c-blue-mid); background: var(--c-blue-light); }

.meal-card-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.meal-card-icon.sunrise { background: #fef9c3; color: #ca8a04; }
.meal-card-icon.snack { background: var(--c-green-light); color: var(--c-green); }
.meal-card-icon.lunch { background: var(--c-blue-light); color: var(--c-blue); }
.meal-card-icon.dinner { background: var(--c-violet-light); color: var(--c-violet); }

.meal-card-info { flex: 1; }
.meal-card-name { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.meal-card-desc { font-size: 10px; color: var(--ink-300); margin-top: 1px; }

.meal-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.meal-card-kcal { font-size: 14px; font-weight: 800; color: var(--ink-900); line-height: 1; }
.meal-card-kcal-sub { font-size: 8px; color: var(--ink-300); }

.meal-check-circle {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-green); color: white;
  font-size: 8px; display: flex; align-items: center; justify-content: center;
}
.meal-log-pill {
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; border: none;
  background: var(--c-blue); color: white;
}
.meal-log-pill.dim { background: var(--surface-2); color: var(--ink-300); }

.hydration-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-teal-light);
  border-radius: 13px; padding: 10px 12px; margin-top: 8px;
}
.hyd-left { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--c-teal); flex-shrink: 0; }
.hyd-track-wrap { flex: 1; }
.hyd-track { height: 5px; background: rgba(8,145,178,0.2); border-radius: 3px; overflow: hidden; }
.hyd-fill { height: 100%; background: var(--c-teal); border-radius: 3px; }
.hyd-val { font-size: 10px; font-weight: 700; color: var(--c-teal); flex-shrink: 0; }

/* ── Progress screen ── */
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.metric-card {
  border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 3px;
  position: relative; overflow: hidden;
}
.metric-card.blue { background: linear-gradient(135deg, #dbeafe, #ede9fe); }
.metric-card.violet { background: linear-gradient(135deg, #ede9fe, #fce7f3); }
.metric-card.teal { background: linear-gradient(135deg, #cffafe, #dcfce7); }
.metric-card.green { background: linear-gradient(135deg, #dcfce7, #d1fae5); }

.metric-card-icon { font-size: 13px; color: var(--ink-300); margin-bottom: 2px; }
.metric-card-val { font-size: 22px; font-weight: 800; color: var(--ink-900); line-height: 1; letter-spacing: -0.02em; }
.metric-card-val span { font-size: 13px; font-weight: 600; }
.metric-card-label { font-size: 10px; font-weight: 600; color: var(--ink-500); }
.metric-card-trend { font-size: 10px; font-weight: 600; }
.metric-card-trend.up { color: var(--c-green); }
.metric-card-trend.down { color: var(--c-rose); }
.metric-card-trend.neutral { color: var(--ink-300); }

.app-chart-wrap { height: 80px; margin-bottom: 12px; padding: 0 2px; }

.milestone-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: white; border-radius: 10px;
  font-size: 11px; color: var(--ink-500);
  margin-bottom: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.milestone-pill.done { color: var(--c-green); background: var(--c-green-light); }
.milestone-pill.done i { color: var(--c-green); }
.milestone-pill.active { color: var(--c-blue); font-weight: 700; background: var(--c-blue-light); }
.milestone-pill i { flex-shrink: 0; }

/* ── Chat screen ── */
.chat-header-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-header-name { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.chat-header-status { font-size: 10px; color: var(--ink-300); display: flex; align-items: center; gap: 4px; }
.chat-online { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; display: inline-block; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 12px 6px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar { display: none; }

.chat-bubble-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-bubble-row.me { flex-direction: row-reverse; }

.cb-avatar {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 7px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.cb-bubble {
  max-width: 80%; padding: 8px 11px;
  border-radius: 16px; font-size: 11px; line-height: 1.5;
}
.cb-bubble.them {
  background: white; color: var(--ink-700);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.cb-bubble.me {
  background: var(--c-blue); color: white;
  border-radius: 16px 4px 16px 16px;
}

.chat-suggested {
  display: flex; gap: 6px; padding: 6px 12px; flex-shrink: 0; flex-wrap: wrap;
}
.sugg-btn {
  padding: 5px 11px; border-radius: 20px;
  border: 1.5px solid var(--c-blue-mid);
  background: var(--c-blue-light); color: var(--c-blue);
  font-size: 11px; font-weight: 600;
}

.chat-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px 12px;
  background: white; border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-input-pill {
  flex: 1; padding: 7px 14px;
  background: var(--surface-2); border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 11px; color: var(--ink-100);
}
.chat-send {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-blue); color: white;
  border: none; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Community Screen ── */
.community-hero {
  border-radius: 18px;
  -webkit-border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
  color: #ffffff;
  background: #2563eb;
  background: -webkit-linear-gradient(315deg, #6d28d9 0%, #1d4ed8 100%);
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.community-hero.wellness-community {
  background: #0891b2;
  background: -webkit-linear-gradient(315deg, #15803d 0%, #0e7490 100%);
  background: linear-gradient(135deg, #0e7490 0%, #15803d 100%);
}
.community-hero.recovery-community {
  background: #7c3aed;
  background: -webkit-linear-gradient(315deg, #0e7490 0%, #6d28d9 100%);
  background: linear-gradient(135deg, #6d28d9 0%, #0e7490 100%);
}
.community-hero.health-community {
  background: #0f766e;
  background: -webkit-linear-gradient(315deg, #1d4ed8 0%, #0f766e 100%);
  background: linear-gradient(135deg, #0f766e 0%, #1d4ed8 100%);
}

.community-hero-top {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  margin-bottom: 12px;
}
.community-hero-title {
  font-size: 13px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2;
  color: #ffffff;
}
.community-hero-sub {
  font-size: 10px; color: #c7d2fe; margin-top: 3px;
}
.community-joined-btn {
  font-size: 10px; font-weight: 700;
  padding: 5px 11px;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  background: #ffffff30;
  border: 1.5px solid #ffffff55;
  color: #ffffff;
  white-space: nowrap;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.community-groups-row {
  display: -webkit-flex;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.community-groups-row::-webkit-scrollbar { display: none; }
.comm-group {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  font-size: 10px; font-weight: 700;
  background: #ffffff25;
  color: #e0e7ff;
  white-space: nowrap;
  cursor: pointer;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  border: 1px solid #ffffff20;
}
.comm-group.active {
  background: #ffffff;
  color: #2563eb;
  border-color: #ffffff;
}
.community-hero.wellness-community .comm-group.active { color: #0891b2; }
.community-hero.recovery-community .comm-group.active { color: #7c3aed; }
.community-hero.health-community   .comm-group.active { color: #0f766e; }

/* Community posts */
.comm-post {
  background: #ffffff;
  border-radius: 14px;
  -webkit-border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e8f0;
}
.comm-post.pinned {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
}
.comm-post-pin {
  font-size: 9px; font-weight: 700; color: #2563eb;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 5px;
}
.comm-post-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.comm-post-meta { -webkit-flex: 1; flex: 1; }
.comm-post-name { font-size: 12px; font-weight: 700; color: #0f1523; }
.comm-post-role { font-size: 9px; color: #9299b0; margin-top: 1px; }

.comm-post-badge {
  font-size: 9px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  white-space: nowrap;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.comm-post-badge.win     { background: #fef3c7; color: #b45309; }
.comm-post-badge.support { background: #eff6ff; color: #2563eb; }
.comm-post-badge.tip     { background: #f0fdf4; color: #16a34a; }

.comm-post-body {
  font-size: 11px; color: #2d3348; line-height: 1.6;
  margin-bottom: 10px;
}
.comm-post-footer {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
}
.comm-reactions {
  display: -webkit-flex;
  display: flex;
  gap: 6px;
}
.comm-react {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  border: 1.5px solid #e5e8f0;
  background: #f1f3f8;
  color: #9299b0;
  cursor: pointer;
  -webkit-transition: all 0.15s;
  transition: all 0.15s;
}
.comm-react.active           { background: #fff0f5; border-color: #fda4af; color: #e11d48; }
.comm-react.active .fa-fire  { color: #f97316; }
.comm-react.active .fa-comment { color: #2563eb; }
.comm-post-time { font-size: 9px; color: #c8cdd8; }

/* Replies */
.comm-replies {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 10px;
  padding-left: 8px;
  border-left: 2px solid #e5e8f0;
}
.comm-reply {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: 6px;
}
.comm-reply-bubble {
  background: #f1f3f8;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  padding: 7px 9px;
  font-size: 10px; color: #2d3348; line-height: 1.5;
  -webkit-flex: 1;
  flex: 1;
}

/* Avatars */
.comm-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  font-size: 10px; font-weight: 800; color: #ffffff;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.comm-avatar.sm { width: 22px; height: 22px; font-size: 8px; }
.comm-avatar.me     { background: #4f46e5; }
.comm-avatar.green  { background: #16a34a; }
.comm-avatar.blue   { background: #2563eb; }
.comm-avatar.violet { background: #7c3aed; }
.comm-avatar.teal   { background: #0891b2; }
.comm-avatar.orange { background: #ea580c; }

/* Compose box */
.comm-compose {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-radius: 14px;
  -webkit-border-radius: 14px;
  border: 1.5px solid #e5e8f0;
  margin-bottom: 4px;
}
.comm-compose-input {
  -webkit-flex: 1; flex: 1;
  font-size: 11px; color: #c8cdd8;
}
.comm-compose-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  background: #2563eb; color: #ffffff;
  border: none; font-size: 10px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* ── Apple Tab Bar ── */
.app-tab-bar {
  display: flex;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 5px 0 14px;
  flex-shrink: 0;
}
.atb-btn {
  flex: 1; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 3px 1px;
  cursor: pointer; transition: all 0.15s;
  color: var(--ink-100); font-size: 8px; font-weight: 600;
}
.atb-icon {
  font-size: 16px; line-height: 1;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.atb-btn.active { color: var(--c-blue); }
.atb-btn span { font-size: 8px; font-weight: 600; }

.has-badge { position: relative; }
.tab-badge {
  position: absolute; top: -5px; right: -8px;
  background: var(--c-rose); color: white;
  font-size: 8px; font-weight: 800; font-family: inherit;
  padding: 1px 4px; border-radius: 10px; min-width: 14px; text-align: center;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────────
   TAB 3: PROFESSIONAL DASHBOARD
───────────────────────────────────────────────── */
.pro-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.pro-sidebar {
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow-y: auto;
}

.pro-profile-card {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.pro-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pro-name { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.pro-role { font-size: 11px; color: var(--ink-300); }

.pro-sidenav { padding: 0 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pro-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  justify-content: space-between;
}
.pro-nav-item:hover { background: var(--surface-2); color: var(--ink-700); }
.pro-nav-item.active { background: var(--c-blue-light); color: var(--c-blue); font-weight: 600; }

.pro-nav-item > :first-child { display: flex; align-items: center; gap: 10px; }

.badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  background: var(--surface-2);
  color: var(--ink-500);
  border-radius: 10px;
}
.badge.alert { background: var(--c-rose-light); color: var(--c-rose); }

.pro-sidebar-kpis {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
  margin-top: auto;
}
.sidebar-kpi { }
.sidebar-kpi-val { font-size: 20px; font-weight: 700; color: var(--ink-900); }
.sidebar-kpi-label { font-size: 11px; color: var(--ink-300); }
.sidebar-kpi.alert .sidebar-kpi-val { color: var(--c-rose); }

/* Pro Main */
.pro-main { flex: 1; overflow-y: auto; padding: 28px; }

.pro-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.pro-page-title { font-size: 22px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.02em; }
.pro-page-sub { font-size: 13px; color: var(--ink-300); margin-top: 2px; }

.pro-topbar-actions { display: flex; gap: 8px; align-items: center; }

/* KPI 4-grid */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card-sm {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.kpi-card-sm.alert-card { border-color: var(--c-rose-light); background: var(--c-rose-light); }
.kpi-card-sm.alert-card .kpi-sm-val { color: var(--c-rose); }
.kpi-sm-label { font-size: 11px; color: var(--ink-300); margin-bottom: 6px; font-weight: 500; }
.kpi-sm-val { font-size: 24px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.02em; line-height: 1; margin-bottom: 4px; }

.pro-content-cols { display: flex; gap: 20px; align-items: flex-start; }

/* Priority queue */
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title-sm { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.section-title-sm.muted { color: var(--ink-300); font-weight: 400; }

.priority-queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; }
.priority-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.priority-status-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.priority-item.critical .priority-status-bar { background: var(--c-rose); }
.priority-item.moderate .priority-status-bar { background: var(--c-amber); }

.member-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--ink-500);
  flex-shrink: 0;
}

.priority-info { flex: 1; }
.priority-name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.priority-meta { font-size: 11px; color: var(--ink-300); }

.priority-tag {
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: 10px; flex-shrink: 0;
}
.priority-tag.critical { background: var(--c-rose-light); color: var(--c-rose); }
.priority-tag.moderate { background: var(--c-amber-light); color: var(--c-amber); }
.priority-tag.stabilizing { background: var(--c-teal-light); color: var(--c-teal); }

.priority-action {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--ink-500);
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.priority-item.critical .priority-action { background: var(--c-rose); border-color: var(--c-rose); color: white; }
.priority-item.moderate .priority-action { background: var(--surface-1); color: var(--ink-700); }

/* Client table */
.table-search {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--ink-300);
}
.table-search input {
  border: none; outline: none; background: transparent;
  font-size: 12px; color: var(--ink-500); width: 100px;
}

.client-table-wrap { overflow-x: auto; }
.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.client-table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-300); padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.client-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--surface-2);
  vertical-align: middle;
}

.td-member { display: flex; align-items: center; gap: 8px; }
.member-avatar-xs {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--ink-500);
  flex-shrink: 0;
}

/* Sidebar cards */
.donut-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--ink-500); }
.donut-legend > div { display: flex; align-items: center; gap: 7px; }

.today-action-list { display: flex; flex-direction: column; gap: 10px; }
.today-action {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-500);
  padding: 6px 8px; border-radius: var(--radius-sm);
}
.today-action.urgent { background: var(--c-rose-light); color: var(--c-rose); font-weight: 600; }
.today-action.warn { background: var(--c-amber-light); color: var(--c-amber); font-weight: 500; }
.today-action.normal { color: var(--ink-500); }

/* ─────────────────────────────────────────────────
   TAB 4: MEMBER PROFILE
───────────────────────────────────────────────── */
.mp-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.mp-sidebar {
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Profile hero */
.mp-profile-hero { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.mp-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.mp-name { font-size: 16px; font-weight: 700; color: var(--ink-900); }
.mp-role { font-size: 12px; color: var(--ink-300); margin-bottom: 10px; }
.mp-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mp-tag {
  font-size: 10px; font-weight: 600; padding: 3px 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-500); border-radius: 4px;
}

/* STATUS SPOTLIGHT — The key new section */
.mp-status-spotlight {
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 2px solid;
}
.mp-status-spotlight.critical {
  background: var(--c-rose-light);
  border-color: #fda4af;
}
.mp-status-spotlight.moderate {
  background: #fffbeb;
  border-color: #fcd34d;
}
.mp-status-spotlight.on-track {
  background: var(--c-green-light);
  border-color: #86efac;
}
.mp-status-spotlight.stabilizing {
  background: var(--c-teal-light);
  border-color: #7dd3fc;
}

.mp-status-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mp-status-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.moderate .mp-status-icon { background: var(--c-amber-light); color: var(--c-amber); }
.critical .mp-status-icon { background: var(--c-rose-light); color: var(--c-rose); }
.on-track .mp-status-icon { background: var(--c-green-light); color: var(--c-green); }
.stabilizing .mp-status-icon { background: var(--c-teal-light); color: var(--c-teal); }

.mp-status-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-300); }
.mp-status-name { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.moderate .mp-status-name { color: var(--c-amber); }
.critical .mp-status-name { color: var(--c-rose); }
.on-track .mp-status-name { color: var(--c-green); }
.stabilizing .mp-status-name { color: var(--c-teal); }

.mp-status-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.mp-score-gauge {
  width: 80px; flex-shrink: 0; position: relative; text-align: center;
}
.gauge-svg { width: 80px; height: 50px; }
.gauge-arc { transition: stroke-dashoffset 1s ease; }
.gauge-label {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  font-size: 16px; font-weight: 800; color: var(--ink-900);
}
.gauge-sub {
  font-size: 9px; color: var(--ink-300); font-weight: 600;
  margin-top: 2px; text-align: center;
}

.mp-score-context { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.score-range-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-300); }
.score-range-row.current-range { font-weight: 700; color: var(--ink-700); }
.score-range {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; min-width: 38px; text-align: center;
}
.score-range.on-track { background: var(--c-green-light); color: var(--c-green); }
.score-range.moderate { background: var(--c-amber-light); color: var(--c-amber); }
.score-range.critical { background: var(--c-rose-light); color: var(--c-rose); }

.mp-status-trend {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--c-green);
  background: rgba(22,163,74,0.08); border-radius: 6px; padding: 5px 9px;
  margin-bottom: 10px;
}

.mp-status-signals { display: flex; flex-direction: column; gap: 5px; }
.signal-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; padding: 4px 9px;
  border-radius: 6px;
}
.signal-chip.active { background: rgba(217,119,6,0.12); color: var(--c-amber); }
.signal-chip.resolved { background: rgba(22,163,74,0.08); color: var(--c-green); opacity: 0.8; }
.signal-chip i { font-size: 8px; }

/* Quick stats */
.mp-quick-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.mp-stat {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px; text-align: center;
}
.mp-stat-val { font-size: 18px; font-weight: 700; color: var(--ink-900); line-height: 1; }
.mp-stat-label { font-size: 10px; color: var(--ink-300); margin-top: 3px; }

/* Coach card */
.mp-coach-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.mp-coach-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mp-coach-name { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.mp-coach-role { font-size: 10px; color: var(--ink-300); }
.mp-coach-msg-btn {
  margin-left: auto;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-blue-light); color: var(--c-blue);
  border: none; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* MP Inner tabs */
.mp-main { padding: 28px; overflow-y: auto; }

.mp-inner-tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.mp-inner-tab {
  padding: 8px 14px;
  border: none; background: transparent;
  font-size: 13px; font-weight: 500;
  color: var(--ink-300);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  white-space: nowrap;
}
.mp-inner-tab:hover { color: var(--ink-700); }
.mp-inner-tab.active { color: var(--c-blue); border-bottom-color: var(--c-blue); font-weight: 600; }

.mp-inner-panel { display: none; }
.mp-inner-panel.active { display: block; }

.mp-panel-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.mp-panel-title { font-size: 18px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.01em; }
.mp-panel-sub { font-size: 12px; color: var(--ink-300); margin-top: 3px; }
.mp-panel-actions { display: flex; gap: 8px; }

/* Week grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.week-day {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}
.week-day.done { background: var(--c-green-light); border-color: #bbf7d0; }
.week-day.today { background: var(--c-blue-light); border-color: var(--c-blue-mid); }
.week-day.rest { background: white; }

.wd-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ink-300); margin-bottom: 6px; }
.week-day.done .wd-label { color: var(--c-green); }
.week-day.today .wd-label { color: var(--c-blue); }

.wd-session { font-size: 11px; font-weight: 600; color: var(--ink-700); margin-bottom: 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.week-day.done .wd-session { color: var(--c-green); }
.week-day.today .wd-session { color: var(--c-blue); }
.week-day.rest .wd-session { color: var(--ink-100); }

.wd-meta { font-size: 9px; color: var(--ink-300); }

/* Coach note box */
.coach-note-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--c-blue-light);
  border: 1px solid var(--c-blue-mid);
  border-radius: var(--radius-md);
  font-size: 12px; color: var(--ink-700);
  margin-bottom: 20px;
  line-height: 1.5;
}
.coach-note-box i { color: var(--c-blue); flex-shrink: 0; margin-top: 2px; }

/* Exercise table */
.exercise-list-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.elc-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--ink-900);
  background: var(--surface-2);
}
.exercise-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.exercise-table th {
  padding: 8px 14px; text-align: left;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-300); border-bottom: 1px solid var(--border);
}
.exercise-table td { padding: 10px 14px; border-bottom: 1px solid var(--surface-2); }
.exercise-table tr:last-child td { border-bottom: none; }

/* Meal plan tab */
.meal-plan-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-bottom: 20px; }
.macro-summary-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
}
.macro-donut-wrap { position: relative; }
.macro-summary-vals { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.macro-val-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-500);
}
.macro-val-row.total { color: var(--ink-900); font-weight: 600; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.dot-carbs { width: 8px; height: 8px; background: var(--c-blue); border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-protein { width: 8px; height: 8px; background: var(--c-violet); border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-fat { width: 8px; height: 8px; background: var(--c-amber); border-radius: 50%; display: inline-block; margin-right: 6px; }

.meal-plan-table-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.meal-plan-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.meal-plan-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-300); border-bottom: 1px solid var(--border); }
.meal-plan-table td { padding: 11px 14px; border-bottom: 1px solid var(--surface-2); }
.meal-plan-table tr:last-child td { border-bottom: none; }
.meal-plan-table .coach-note-box { margin: 12px; }

.compliance {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
}
.compliance.good { background: var(--c-green-light); color: var(--c-green); }
.compliance.moderate { background: var(--c-amber-light); color: var(--c-amber); }
.compliance.low { background: var(--c-rose-light); color: var(--c-rose); }

/* Health plan */
.protocol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.protocol-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  box-shadow: var(--shadow-sm);
}
.protocol-card.active-protocol { border-color: var(--c-blue-mid); }

.protocol-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--c-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--c-blue); flex-shrink: 0;
}
.protocol-icon.amber { background: var(--c-amber-light); color: var(--c-amber); }
.protocol-icon.violet { background: var(--c-violet-light); color: var(--c-violet); }
.protocol-icon.teal { background: var(--c-teal-light); color: var(--c-teal); }

.protocol-info { flex: 1; }
.protocol-name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.protocol-detail { font-size: 11px; color: var(--ink-500); margin: 2px 0; }
.protocol-status { font-size: 10px; color: var(--ink-300); }
.protocol-status.active { color: var(--c-blue); font-weight: 600; }

.protocol-compliance {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.protocol-compliance.good { background: var(--c-green-light); color: var(--c-green); }
.protocol-compliance.moderate { background: var(--c-amber-light); color: var(--c-amber); }
.protocol-compliance.low { background: var(--c-rose-light); color: var(--c-rose); }

.biometric-table-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.btc-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--ink-900); background: var(--surface-2); }
.biometric-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.biometric-table th { padding: 8px 14px; text-align: left; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-300); border-bottom: 1px solid var(--border); }
.biometric-table td { padding: 10px 14px; border-bottom: 1px solid var(--surface-2); }
.biometric-table tr:last-child td { border-bottom: none; }

/* Progress tab */
.progress-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.progress-chart-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.progress-chart-title { font-size: 13px; font-weight: 600; color: var(--ink-900); margin-bottom: 12px; }

.milestone-grid-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.milestone-grid-title { font-size: 13px; font-weight: 600; color: var(--ink-900); margin-bottom: 14px; }
.milestone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.milestone-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 11px; color: var(--ink-300); text-align: center;
  line-height: 1.4;
}
.milestone-card.done { background: var(--c-green-light); border-color: #bbf7d0; color: var(--c-green); }
.milestone-card.active { background: var(--c-blue-light); border-color: var(--c-blue-mid); color: var(--c-blue); font-weight: 600; }
.milestone-card i { font-size: 16px; }

/* ── AI RECOMMENDATIONS TAB ── */
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--c-blue-light), var(--c-violet-light));
  border: 1px solid var(--c-violet-mid);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-violet);
}

.ai-context-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(124,58,237,0.05));
  border: 1px solid var(--c-violet-mid);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.ai-context-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-context-text { font-size: 13px; color: var(--ink-700); line-height: 1.6; }
.ai-context-text strong { color: var(--ink-900); }

.ai-recs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ai-rec-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ai-rec-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Card type left borders */
.ai-rec-card.workout { border-left: 3px solid var(--c-blue); }
.ai-rec-card.nutrition { border-left: 3px solid var(--c-amber); }
.ai-rec-card.health { border-left: 3px solid var(--c-violet); }
.ai-rec-card.engagement { border-left: 3px solid var(--c-teal); }
.ai-rec-card.clinical { border-left: 3px solid var(--c-rose); }
.ai-rec-card.motivation { border-left: 3px solid #f59e0b; }

.ai-rec-header {
  display: flex; align-items: center; gap: 12px;
}
.ai-rec-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.workout .ai-rec-icon { background: var(--c-blue-light); color: var(--c-blue); }
.nutrition .ai-rec-icon { background: var(--c-amber-light); color: var(--c-amber); }
.health .ai-rec-icon { background: var(--c-violet-light); color: var(--c-violet); }
.engagement .ai-rec-icon { background: var(--c-teal-light); color: var(--c-teal); }
.clinical .ai-rec-icon { background: var(--c-rose-light); color: var(--c-rose); }
.motivation .ai-rec-icon { background: #fef3c7; color: #d97706; }

.ai-rec-category { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-300); }
.ai-rec-priority {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; display: inline-flex; margin-top: 3px;
}
.ai-rec-priority.high { background: var(--c-rose-light); color: var(--c-rose); }
.ai-rec-priority.medium { background: var(--c-amber-light); color: var(--c-amber); }
.ai-rec-priority.low { background: var(--surface-2); color: var(--ink-300); }

.ai-rec-confidence {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--c-green);
  background: var(--c-green-light);
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-rec-title { font-size: 14px; font-weight: 700; color: var(--ink-900); line-height: 1.3; }

.ai-rec-body { font-size: 12px; color: var(--ink-500); line-height: 1.65; }

.ai-rec-data-points { display: flex; flex-direction: column; gap: 5px; }
.data-point {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 500; color: var(--ink-500);
  background: var(--surface-2); border-radius: 5px; padding: 4px 9px;
}
.data-point i { color: var(--ink-300); font-size: 10px; }

.ai-rec-actions { display: flex; gap: 8px; margin-top: auto; }

.ai-apply-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  border: none;
  background: var(--c-blue);
  color: white;
  transition: background 0.15s;
}
.ai-apply-btn:hover { background: #1d4ed8; }

.ai-review-btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--ink-500);
  transition: all 0.15s;
}
.ai-review-btn:hover { background: var(--surface-2); }

/* Notes/Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 16px;
  padding: 0 0 24px 0;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px; top: 36px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }

.tl-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  border: 2px solid var(--border); background: white; color: var(--ink-300);
  z-index: 1;
}
.timeline-item.intervention .tl-dot { background: var(--c-rose-light); color: var(--c-rose); border-color: #fda4af; }
.timeline-item.checkin .tl-dot { background: var(--c-green-light); color: var(--c-green); border-color: #bbf7d0; }
.timeline-item.note .tl-dot { background: var(--c-blue-light); color: var(--c-blue); border-color: var(--c-blue-mid); }

.tl-content { flex: 1; padding-top: 4px; }
.tl-date { font-size: 11px; font-weight: 600; color: var(--ink-300); margin-bottom: 3px; }
.tl-title { font-size: 14px; font-weight: 700; color: var(--ink-900); margin-bottom: 5px; }
.tl-body { font-size: 12px; color: var(--ink-500); line-height: 1.6; }

/* ─────────────────────────────────────────────────
   TAB 5: NEXORA DASHBOARD
───────────────────────────────────────────────── */

/* ── Header ── */
.nxd-header {
  background: linear-gradient(135deg, #0a0f1e 0%, #111827 60%, #0f172a 100%);
  padding: 18px 36px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nxd-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto;
}
.nxd-header-left { display: flex; align-items: center; gap: 20px; }
.nxd-logo-svg { 
  height: 30px; 
  width: 30px;
  flex-shrink: 0;
}
.nxd-logo-wordmark {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}
.nxd-header-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.12); }
.nxd-header-text { display: flex; flex-direction: column; gap: 2px; }
.nxd-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.92); letter-spacing: -0.01em; }
.nxd-sub { font-size: 11px; color: rgba(255,255,255,0.35); }
.nxd-header-right { display: flex; align-items: center; gap: 10px; }
.nxd-live-badge {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 13px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.04);
}
.nxd-date-badge {
  font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 500;
}

/* ── Body ── */
.nxd-body {
  padding: 28px 36px 48px;
  background: #f8f9fc;
}
#tab-nexora-dashboard {
  background: #f8f9fc;
}

/* ── KPI Row ── */
.nxd-kpi-row {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 12px; margin-bottom: 24px;
}
.nxd-kpi {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 2px;
  transition: box-shadow 0.2s;
}
.nxd-kpi:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.nxd-kpi-icon {
  font-size: 13px; color: var(--ink-100);
  margin-bottom: 6px;
}
.nxd-kpi-val {
  font-size: 28px; font-weight: 800; color: var(--ink-900);
  letter-spacing: -0.04em; line-height: 1;
}
.nxd-kpi-unit { font-size: 17px; font-weight: 700; }
.nxd-kpi-label {
  font-size: 11px; font-weight: 500; color: var(--ink-300);
  margin-top: 4px;
}
.nxd-kpi-delta {
  font-size: 11px; font-weight: 600; margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.nxd-kpi-delta.positive { color: var(--c-green); }
.nxd-kpi-delta.negative { color: var(--c-rose); }
.nxd-kpi-delta.neutral { color: var(--ink-300); }

.nxd-kpi.alert-kpi {
  border-color: #fecdd3; background: #fff5f6;
}
.nxd-kpi.alert-kpi .nxd-kpi-val { color: var(--c-rose); }
.nxd-kpi.alert-kpi .nxd-kpi-icon { color: var(--c-rose); opacity: 0.7; }

.nxd-kpi.accent-kpi {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  border-color: transparent;
}
.nxd-kpi.accent-kpi .nxd-kpi-icon { color: rgba(255,255,255,0.6); }
.nxd-kpi.accent-kpi .nxd-kpi-val { color: white; }
.nxd-kpi.accent-kpi .nxd-kpi-label { color: rgba(255,255,255,0.65); }
.nxd-kpi-delta.accent-delta { color: rgba(255,255,255,0.75); }

/* ── Strategic Insights Banner (full-width) ── */
.nxd-insights-banner {
  background: #0f1523;
  -webkit-background: #0f1523;
  border-radius: 18px;
  -webkit-border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 24px;
  border: 1px solid #1e2740;
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.nxd-insights-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 18px;
}
.nxd-insights-title-wrap {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
}
.nxd-insights-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  background: #2d2060;
  border: 1px solid #4c3a9e;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 14px;
  color: #a78bfa;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.nxd-insights-title {
  font-size: 15px;
  font-weight: 700;
  color: #f0f4ff;
  letter-spacing: -0.01em;
}
.nxd-insights-sub {
  font-size: 11px;
  color: #6b7a9e;
  margin-top: 2px;
}
.nxd-insights-cards {
  display: -webkit-grid;
  display: grid;
  -webkit-grid-template-columns: repeat(4, 1fr);
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.nsi-card {
  border-radius: 13px;
  -webkit-border-radius: 13px;
  padding: 16px;
  border: 1px solid #1e2740;
  background: #141c2e;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}
.nsi-card.green { border-color: #1a3a28; }
.nsi-card.rose  { border-color: #3a1a22; }
.nsi-card.blue  { border-color: #1a2a4a; }
.nsi-card.amber { border-color: #3a2a0a; }

.nsi-tag {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.nsi-card.green .nsi-tag { color: #4ade80; }
.nsi-card.rose .nsi-tag  { color: #fb7185; }
.nsi-card.blue .nsi-tag  { color: #60a5fa; }
.nsi-card.amber .nsi-tag { color: #fbbf24; }

.nsi-headline {
  font-size: 13px;
  font-weight: 700;
  color: #e8eeff;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.nsi-body {
  font-size: 11px;
  color: #6b7a9e;
  line-height: 1.6;
}

/* ── Main columns ── */
.nxd-main-cols { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.nxd-col-left { display: flex; flex-direction: column; gap: 20px; }
.nxd-col-right { display: flex; flex-direction: column; gap: 16px; }

.nxd-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.nxd-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.nxd-card-title { font-size: 14px; font-weight: 700; color: var(--ink-900); letter-spacing: -0.01em; }
.nxd-card-sub { font-size: 11px; color: var(--ink-300); margin-top: 2px; }
.nxd-card-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  background: var(--surface-2); color: var(--ink-300);
  border-radius: 20px; border: 1px solid var(--border);
  white-space: nowrap;
}

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

/* ── Tenant Table ── */
.tenant-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tenant-table th {
  padding: 7px 12px; text-align: left;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-100); border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--surface-0);
}
.tenant-table th:first-child { border-radius: 8px 0 0 0; }
.tenant-table th:last-child { border-radius: 0 8px 0 0; }
.tenant-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--surface-2);
  vertical-align: middle; color: var(--ink-700); font-size: 12px;
}
.tenant-table tr:last-child td { border-bottom: none; }
.tenant-table tr:hover td { background: var(--surface-0); }
.tenant-table tr.row-alert td { background: #fff8f8; }
.tenant-table tr.row-alert:hover td { background: #fff0f0; }

.tenant-name-cell {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; color: var(--ink-900);
}
.tenant-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tenant-dot.green  { background: var(--c-green); }
.tenant-dot.blue   { background: var(--c-blue); }
.tenant-dot.violet { background: var(--c-violet); }
.tenant-dot.amber  { background: var(--c-amber); }
.tenant-dot.rose   { background: var(--c-rose); }

.niche-tag {
  font-size: 9px; font-weight: 700; padding: 3px 8px;
  border-radius: 5px; white-space: nowrap;
}
.niche-tag.rehab     { background: var(--c-teal-light); color: var(--c-teal); }
.niche-tag.gym       { background: var(--c-blue-light); color: var(--c-blue); }
.niche-tag.metabolic { background: var(--c-violet-light); color: var(--c-violet); }
.niche-tag.womens    { background: #fce7f3; color: #db2777; }
.niche-tag.concierge { background: #fef3c7; color: #b45309; }
.niche-tag.lifestyle { background: var(--c-green-light); color: var(--c-green); }

.adh-bar-wrap { display: flex; align-items: center; gap: 8px; }
.adh-bar { height: 5px; border-radius: 3px; flex-shrink: 0; min-width: 4px; }
.adh-bar-wrap span { font-size: 11px; font-weight: 700; color: var(--ink-700); }

.at-risk-num { font-weight: 700; font-size: 12px; }
.at-risk-num.low    { color: var(--c-green); }
.at-risk-num.medium { color: var(--c-amber); }
.at-risk-num.high   { color: var(--c-rose); }

.protected-val { font-weight: 700; color: var(--c-green); }
.churn-val     { color: var(--ink-300); font-size: 12px; }
.churn-high    { color: var(--c-rose); font-weight: 600; }

/* ── Top Pros ── */
.top-pros-list { display: flex; flex-direction: column; gap: 7px; }
.top-pro {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.15s;
}
.top-pro:hover { background: var(--surface-0); }
.top-pro.gold   { background: #fffbeb; border-color: #fde68a; }
.top-pro.silver { background: #f8fafc; border-color: #e2e8f0; }
.top-pro.bronze { background: #fff7ed; border-color: #fed7aa; }

.top-pro-rank { font-size: 16px; line-height: 1; width: 22px; flex-shrink: 0; }
.top-pro-num  { font-size: 11px; font-weight: 800; color: var(--ink-100); text-align: center; }

.top-pro-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: white; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.top-pro-info { flex: 1; min-width: 0; }
.top-pro-name { font-size: 12px; font-weight: 700; color: var(--ink-900); }
.top-pro-meta { font-size: 10px; color: var(--ink-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-pro-score { font-size: 13px; font-weight: 800; color: var(--c-green); flex-shrink: 0; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .nxd-insights-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .nxd-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .nxd-main-cols { grid-template-columns: 1fr; }
  .overview-cols { grid-template-columns: 1fr; }
  .nxd-body { padding: 24px 24px 40px; }
  .overview-hero { padding: 48px 32px; }
  .hero-logo-col { width: 340px; }
  .hero-full-logo { width: 300px; }
  .overview-body { padding: 32px 32px 40px; }
}

@media (max-width: 768px) {
  .overview-hero-inner {
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 28px;
  }
  .hero-logo-col {
    width: 100%;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
  }
  .hero-full-logo { width: 240px; }
  .hero-headline { font-size: 32px; }
  .overview-hero { padding: 40px 24px; }
  .overview-body { padding: 24px 20px 32px; }
  .kpi-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .pro-layout { grid-template-columns: 1fr; }
  .pro-sidebar { display: none; }
  .mp-layout { grid-template-columns: 1fr; }
  .mp-sidebar { display: none; }
  .member-view-layout { flex-direction: column; padding: 24px; gap: 32px; }
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
  .ai-recs-grid { grid-template-columns: 1fr; }
  .progress-charts-row { grid-template-columns: 1fr; }
  .protocol-grid { grid-template-columns: 1fr; }
  .meal-plan-grid { grid-template-columns: 1fr; }
  .nxd-charts-row { grid-template-columns: 1fr; }
  .nxd-insights-cards { grid-template-columns: 1fr 1fr; }
  .nxd-main-cols { grid-template-columns: 1fr; }
}
