/* FormArea — App Layout & All View Styles */

/* ══════════════════════════════
   GLOBAL FLUID SCALING (RESPONSIVE TYPOGRAPHY)
══════════════════════════════ */
html { font-size: 16px; }
@media (max-width: 1600px) { html { font-size: 15px; } }
@media (max-width: 1400px) { html { font-size: 14px; } }
@media (max-width: 1200px) { html { font-size: 13px; } }

/* ══════════════════════════════
   PAGE TRANSITIONS
══════════════════════════════ */
.view {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-transition-enter {
  opacity: 0;
  transform: translateY(12px);
}

/* ══════════════════════════════
   APP SHELL
══════════════════════════════ */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.app-layout { display: flex; min-height: 100vh; }

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform var(--transition);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-6) var(--sp-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--text-xl);
  color: var(--text);
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inv);
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); padding: 0 var(--sp-3); overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  color: var(--text-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-2); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-locked { color: var(--text-3) !important; }
.nav-lock-badge {
  margin-left: auto;
  font-size: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--r-full);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-bold);
}
.sidebar-footer {
  padding: var(--sp-4) var(--sp-6) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.user-name { font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--text); line-height: 1.2; }
.user-plan-label { font-size: var(--text-xs); color: var(--text-3); }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  color: var(--text);
}
.sidebar-close {
  display: none;
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  color: var(--text-3);
}

/* ══════════════════════════════
   MAIN CONTENT
══════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.view {
  flex: 1;
  padding: var(--sp-8) var(--sp-10);
  max-width: var(--content-w);
  width: 100%;
  animation: fadeIn var(--t-normal) var(--ease);
}
.view-header { margin-bottom: var(--sp-8); }
.view-title {
  font-family: var(--font-head);
  font-size: var(--text-3xl);
  font-weight: var(--fw-extra);
  color: var(--text);
  line-height: 1.1;
}
.view-subtitle { color: var(--text-3); margin-top: var(--sp-2); font-size: var(--text-base); }

/* App header bar */
.app-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}
.app-header-left { display: flex; align-items: center; gap: var(--sp-4); }
.app-header-right { display: flex; align-items: center; gap: var(--sp-3); }

/* ══════════════════════════════
   LANDING PAGE
══════════════════════════════ */
.landing { min-height: 100vh; }
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,15,26,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-8);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--text-xl);
}
.landing-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inv);
  font-size: var(--text-base);
}
.landing-nav-right { display: flex; align-items: center; gap: var(--sp-4); }

/* Hero */
.hero {
  padding: var(--sp-24) var(--sp-8) var(--sp-20);
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-6);
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-extra);
  line-height: 1.05;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: var(--sp-6);
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  max-width: 480px;
}
.hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-10); }
.hero-stats { display: flex; gap: var(--sp-8); }
.hero-stat-value { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--fw-extra); color: var(--text); }
.hero-stat-label { font-size: var(--text-sm); color: var(--text-3); margin-top: 2px; }

/* Hero visual */
.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  box-shadow: var(--shadow-lg);
}
.hero-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: border-color var(--transition);
}
.hero-card:hover { border-color: var(--border-hover); }
.hero-card-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.hero-card-title { font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--text); }
.hero-card-sub { font-size: var(--text-xs); color: var(--text-3); margin-top: 2px; }
.hero-card-badge {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: var(--fw-bold);
}

/* Features section */
.features-section {
  padding: var(--sp-20) var(--sp-8);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-4);
}
.section-title {
  font-family: var(--font-head);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extra);
  color: var(--text);
  margin-bottom: var(--sp-3);
}
.section-sub {
  font-size: var(--text-lg);
  color: var(--text-3);
  max-width: 520px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 52px; height: 52px;
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--sp-5);
}
.feature-title { font-family: var(--font-head); font-size: var(--text-lg); font-weight: var(--fw-bold); color: var(--text); margin-bottom: var(--sp-2); }
.feature-desc { font-size: var(--text-sm); color: var(--text-3); line-height: 1.65; }

/* Pricing section */
.pricing-section {
  padding: var(--sp-20) var(--sp-8);
  max-width: var(--max-w);
  margin: 0 auto;
}
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); max-width: 760px; margin: 0 auto; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
}
.pricing-card.featured {
  border-color: var(--border-hover);
  background: var(--surface-2);
  position: relative;
}
.pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--text-inv);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 4px 14px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.pricing-name { font-size: var(--text-sm); font-weight: var(--fw-bold); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--sp-4); }
.pricing-price-row { display: flex; align-items: flex-end; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.pricing-price { font-family: var(--font-head); font-size: var(--text-5xl); font-weight: var(--fw-extra); color: var(--text); line-height: 1; }
.pricing-period { font-size: var(--text-lg); color: var(--text-3); margin-bottom: 4px; }
.pricing-desc { font-size: var(--text-sm); color: var(--text-3); margin-bottom: var(--sp-6); }
.pricing-features { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.pricing-feature { font-size: var(--text-sm); color: var(--text-2); }

/* FAQ */
.faq-section { padding: var(--sp-20) var(--sp-8); max-width: 700px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-5) 0;
  cursor: pointer;
  font-weight: var(--fw-medium);
  color: var(--text);
  font-size: var(--text-base);
  transition: color var(--t-fast);
}
.faq-question:hover { color: var(--accent); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--t-slow) var(--ease);
}
.faq-answer.open { max-height: 200px; }
.faq-answer-inner { padding: 0 0 var(--sp-5); color: var(--text-3); font-size: var(--text-sm); line-height: 1.7; }
.faq-chevron { transition: transform var(--t-fast); color: var(--text-3); }
.faq-chevron.open { transform: rotate(180deg); color: var(--accent); }

/* Landing footer */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font-size: var(--text-sm);
}

/* ══════════════════════════════
   AUTH VIEW
══════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-8);
}
.auth-visual-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: var(--fw-extra);
  line-height: 1.1;
  color: var(--text);
}
.auth-visual-title span { color: var(--accent); }
.auth-features { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-feature { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-sm); color: var(--text-2); }
.auth-feature-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.auth-form-side {
  padding: var(--sp-12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.auth-header { text-align: center; }
.auth-logo-wrap { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.auth-title { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--text); }
.auth-sub { color: var(--text-3); font-size: var(--text-sm); margin-top: var(--sp-1); }
.plan-selector { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.plan-option {
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.plan-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.plan-option-name { font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--text); }
.plan-option-price { font-size: var(--text-xs); color: var(--text-3); margin-top: 2px; }
.auth-link { text-align: center; font-size: var(--text-sm); color: var(--text-3); }
.auth-link a { color: var(--accent); font-weight: var(--fw-medium); }
.auth-link a:hover { text-decoration: underline; }

/* ══════════════════════════════
   CONSULTATION WIZARD
══════════════════════════════ */
.consult-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  background: var(--bg);
}
.consult-header {
  text-align: center;
  margin-bottom: var(--sp-8);
  max-width: 600px;
}
.consult-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--text-xl);
  margin-bottom: var(--sp-6);
}
.consult-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-inv); font-size: var(--text-base);
}
.consult-title { font-family: var(--font-head); font-size: var(--text-3xl); font-weight: var(--fw-extra); color: var(--text); margin-bottom: var(--sp-3); }
.consult-subtitle { color: var(--text-3); font-size: var(--text-base); }

.wizard-container { width: 100%; max-width: 560px; }

/* Step progress */
.wizard-progress { margin-bottom: var(--sp-6); }
.wizard-step-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--sp-2);
}
.wizard-step-label span:last-child { color: var(--accent); }

/* Wizard step */
.wizard-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  animation: slideUp var(--t-normal) var(--ease);
}
.wizard-step-title {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin-bottom: var(--sp-6);
}
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-8);
  gap: var(--sp-3);
}

/* Generating screen */
.generating-screen {
  text-align: center;
  padding: var(--sp-12);
}
.generating-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  animation: spin 2s linear infinite;
  display: inline-block;
}
.generating-title { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--text); margin-bottom: var(--sp-2); }
.generating-sub { color: var(--text-3); margin-bottom: var(--sp-6); }
.generating-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: var(--r-full);
  margin: 0 3px;
  animation: dotBlink 1.4s ease-in-out infinite;
}
.generating-dots span:nth-child(2) { animation-delay: 0.2s; }
.generating-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Done screen */
.done-screen {
  text-align: center;
  padding: var(--sp-8);
  animation: slideUp var(--t-slow) var(--ease);
}
.done-checkmark {
  width: 72px; height: 72px;
  background: var(--accent);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-inv);
  margin: 0 auto var(--sp-6);
}

/* ══════════════════════════════
   DASHBOARD
══════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-8); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-8); }
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.quick-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-card-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.quick-card-title { font-weight: var(--fw-semi); color: var(--text); font-size: var(--text-sm); }
.quick-card-sub { font-size: var(--text-xs); color: var(--text-3); }
.upgrade-banner {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.upgrade-banner-text { font-size: var(--text-sm); color: var(--text-2); }
.upgrade-banner-text strong { color: var(--accent); display: block; font-size: var(--text-base); font-family: var(--font-head); margin-bottom: 2px; }

/* ══════════════════════════════
   WORKOUT PLAN
══════════════════════════════ */
.day-tabs { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-2); margin-bottom: var(--sp-6); }
.day-tab {
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-3);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.day-tab:hover { border-color: var(--border-hover); color: var(--text-2); }
.day-tab.active { background: var(--accent); color: var(--text-inv); border-color: var(--accent); }
.day-tab.locked { cursor: default; opacity: 0.5; }
.day-tab.done::after { content: ' ✓'; color: var(--accent); }

.day-panel { animation: slideUp var(--t-normal) var(--ease); }
.day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}
.day-panel-title { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--text); }
.day-panel-meta { display: flex; gap: var(--sp-4); font-size: var(--text-sm); color: var(--text-3); }

.exercise-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.exercise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  transition: all var(--transition);
}
.exercise-card:hover { border-color: var(--border-hover); }
.exercise-card.done { opacity: 0.55; }
.exercise-card.done .exercise-name { text-decoration: line-through; }
.exercise-icon {
  width: 52px; height: 52px;
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.exercise-icon svg { width: 28px; height: 28px; }
.exercise-info { flex: 1; min-width: 0; }
.exercise-name { font-weight: var(--fw-semi); color: var(--text); margin-bottom: var(--sp-1); }
.exercise-desc { font-size: var(--text-sm); color: var(--text-3); line-height: 1.5; }
.exercise-meta { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); flex-wrap: wrap; }
.exercise-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 2px var(--sp-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--text-2);
}
.exercise-chip-accent { background: var(--accent-dim); border-color: var(--border-hover); color: var(--accent); }
.exercise-done-btn { flex-shrink: 0; }

/* Rest day card */
.rest-day-card {
  text-align: center;
  padding: var(--sp-16);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.rest-day-icon { font-size: 3rem; margin-bottom: var(--sp-4); }
.rest-day-title { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--fw-bold); color: var(--text); margin-bottom: var(--sp-2); }
.rest-day-desc { color: var(--text-3); }

/* ══════════════════════════════
   DIET PLAN
══════════════════════════════ */
.diet-header { display: flex; gap: var(--sp-6); margin-bottom: var(--sp-8); align-items: flex-start; }
.macros-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  min-width: 200px;
}
.macros-title { font-weight: var(--fw-semi); margin-bottom: var(--sp-4); color: var(--text); font-size: var(--text-sm); }
.macro-bar { margin-bottom: var(--sp-3); }
.macro-bar-label { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-3); margin-bottom: var(--sp-1); }
.macro-progress { height: 6px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; }
.macro-fill { height: 100%; border-radius: var(--r-full); }
.macro-fill-p { background: var(--accent); }
.macro-fill-c { background: #47B8FF; }
.macro-fill-f { background: #FFB547; }
.daily-total-card {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
  margin-bottom: var(--sp-4);
}
.daily-total-num { font-family: var(--font-head); font-size: var(--text-3xl); font-weight: var(--fw-extra); color: var(--accent); }
.daily-total-label { font-size: var(--text-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.meal-list { display: flex; flex-direction: column; gap: var(--sp-4); flex: 1; }
.meal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.meal-icon { font-size: 2rem; flex-shrink: 0; }
.meal-info { flex: 1; }
.meal-type { font-size: var(--text-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: var(--fw-bold); margin-bottom: var(--sp-1); }
.meal-name { font-weight: var(--fw-semi); color: var(--text); margin-bottom: var(--sp-2); }
.meal-macros { display: flex; gap: var(--sp-4); font-size: var(--text-xs); color: var(--text-3); }
.meal-macro span { font-weight: var(--fw-bold); color: var(--text-2); }
.meal-kcal {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  flex-shrink: 0;
  text-align: right;
}
.meal-kcal small { display: block; font-size: var(--text-xs); color: var(--text-3); font-family: var(--font-body); font-weight: var(--fw-regular); }

.shopping-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}
.shopping-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.shopping-item { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-sm); color: var(--text-2); }

/* ══════════════════════════════
   CALCULATORS
══════════════════════════════ */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.calc-card-header { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.calc-card-icon { font-size: 1.6rem; }
.calc-card-title { font-family: var(--font-head); font-weight: var(--fw-bold); font-size: var(--text-lg); color: var(--text); }
.calc-card-subtitle { font-size: var(--text-sm); color: var(--text-3); }
.calc-result {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-align: center;
  animation: slideUp var(--t-normal) var(--ease);
}
.calc-result-num { font-family: var(--font-head); font-size: var(--text-4xl); font-weight: var(--fw-extra); color: var(--accent); line-height: 1; }
.calc-result-label { font-size: var(--text-sm); color: var(--text-3); margin-top: var(--sp-1); }
.calc-result-sub { margin-top: var(--sp-3); font-size: var(--text-sm); color: var(--text-2); }
.bmi-scale {
  display: flex;
  border-radius: var(--r-full);
  overflow: hidden;
  height: 8px;
  margin: var(--sp-3) 0 var(--sp-2);
}
.bmi-seg { flex: 1; }
.bmi-seg-1 { background: #47B8FF; }
.bmi-seg-2 { background: var(--accent); }
.bmi-seg-3 { background: var(--warning); }
.bmi-seg-4 { background: var(--error); }
.strength-levels {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.strength-level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  transition: all var(--t-fast);
}
.strength-level.highlight { background: var(--accent-dim); border: 1px solid var(--border-hover); }
.strength-level-name { color: var(--text-2); }
.strength-level-value { color: var(--text-3); font-size: var(--text-xs); }
.strength-level.highlight .strength-level-name { color: var(--accent); font-weight: var(--fw-semi); }

/* ══════════════════════════════
   CHAT
══════════════════════════════ */
.chat-layout { display: flex; gap: var(--sp-6); height: calc(100vh - 200px); }
.chat-panel {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.chat-avatar {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--text-inv);
  flex-shrink: 0;
}
.chat-header-name { font-weight: var(--fw-semi); color: var(--text); font-size: var(--text-sm); }
.chat-header-status { font-size: var(--text-xs); color: var(--accent); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  scroll-behavior: smooth;
}
.chat-msg { display: flex; gap: var(--sp-3); max-width: 80%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  align-self: flex-end;
}
.chat-msg.user .chat-msg-avatar { background: var(--accent-dim2); }
.chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 100%;
}
.chat-msg.user .chat-bubble {
  background: var(--accent-dim2);
  border-color: var(--border-hover);
  color: var(--text);
}
.chat-typing { display: flex; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); }
.chat-typing span {
  width: 6px; height: 6px;
  background: var(--text-3);
  border-radius: var(--r-full);
  animation: dotBlink 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
.chat-input-area {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text);
  font-size: var(--text-sm);
  resize: none;
  max-height: 120px;
  transition: border-color var(--transition);
  line-height: 1.5;
}
.chat-input:focus { border-color: var(--border-hover); }
.chat-limit-notice {
  padding: var(--sp-4) var(--sp-6);
  background: var(--accent-dim);
  border-top: 1px solid var(--border-hover);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

/* ══════════════════════════════
   FORM CHECK
══════════════════════════════ */
.form-check-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.upload-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--r-xl);
  padding: var(--sp-12);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.upload-zone.has-image { border-style: solid; border-color: var(--border-hover); }
.upload-icon { font-size: 2.5rem; margin-bottom: var(--sp-4); }
.upload-title { font-weight: var(--fw-semi); color: var(--text); margin-bottom: var(--sp-2); }
.upload-hint { font-size: var(--text-sm); color: var(--text-3); }
.upload-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}
.analysis-result {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  animation: slideUp var(--t-normal) var(--ease);
}
.analysis-score {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
}
.analysis-score-num { font-family: var(--font-head); font-size: var(--text-4xl); font-weight: var(--fw-extra); color: var(--accent); }
.analysis-section { margin-bottom: var(--sp-4); }
.analysis-section-title { font-weight: var(--fw-semi); font-size: var(--text-sm); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-3); }
.analysis-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.analysis-item { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--text-sm); color: var(--text-2); }

.history-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.history-item-date { font-size: var(--text-xs); color: var(--text-3); }
.history-item-score { font-family: var(--font-head); font-weight: var(--fw-bold); color: var(--accent); margin-left: auto; }

/* ══════════════════════════════
   UPGRADE PAGE
══════════════════════════════ */
.upgrade-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
}
.upgrade-container { max-width: 480px; width: 100%; text-align: center; }
.upgrade-icon { font-size: 3rem; margin-bottom: var(--sp-4); }
.upgrade-title { font-family: var(--font-head); font-size: var(--text-4xl); font-weight: var(--fw-extra); color: var(--text); margin-bottom: var(--sp-3); }
.upgrade-price-display {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  margin: var(--sp-6) 0;
  display: inline-flex;
  align-items: flex-end;
  gap: var(--sp-2);
}
.upgrade-price-num { font-family: var(--font-head); font-size: var(--text-5xl); font-weight: var(--fw-extra); color: var(--accent); line-height: 1; }
.upgrade-price-period { font-size: var(--text-lg); color: var(--text-3); margin-bottom: 4px; }
.upgrade-features { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); margin: var(--sp-6) 0; }
.upgrade-features-title { font-weight: var(--fw-semi); color: var(--text); margin-bottom: var(--sp-4); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.upgrade-feature-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.upgrade-feature-item { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-sm); color: var(--text-2); }
.upgrade-feature-check { color: var(--accent); font-weight: var(--fw-bold); flex-shrink: 0; }
.upgrade-meta { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.upgrade-meta-item { font-size: var(--text-sm); color: var(--text-3); }

/* Success screen */
.upgrade-success {
  text-align: center;
  padding: var(--sp-8);
  animation: slideUp var(--t-slow) var(--ease);
}
.success-icon {
  width: 80px; height: 80px;
  background: var(--accent);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--text-inv);
  margin: 0 auto var(--sp-6);
}

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ══════════════════════════════
   RESPONSIVE — APP
══════════════════════════════ */
.measurements-grid { display: grid; grid-template-columns: 5fr 4fr; gap: 2.5rem; align-items: stretch; width: 100%; }

@media (max-width: 1300px) {
  .measurements-grid { gap: 1.5rem; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
  .form-check-layout { grid-template-columns: 1fr; }
  .measurements-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; }
  .view { padding: var(--sp-6) var(--sp-4); padding-top: 80px; }
  .hero { grid-template-columns: 1fr; gap: var(--sp-8); padding: var(--sp-12) var(--sp-4) var(--sp-8); }
  .hero-visual { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .shopping-list { grid-template-columns: 1fr; }
  .chat-layout { flex-direction: column; height: auto; }
  .chat-panel { height: 60vh; }
  .diet-header { flex-direction: column; }
  .app-header { padding: 0 var(--sp-4); }
}
@media (max-width: 480px) {
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .landing-nav { padding: 0 var(--sp-4); }
}

/* ══════════════════════════════
   PREMIUM PREVIEW (BLUR)
══════════════════════════════ */
.premium-preview-wrapper {
  position: relative;
  overflow: hidden; /* prevents scrolling the blurred content if it's long */
}
.premium-preview-content {
  filter: blur(8px) grayscale(40%);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
  transition: filter 0.5s ease;
}
.premium-preview-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: rgba(10, 10, 15, 0.4);
}

/* Duży blok paywalla */
.paywall-container {
  background: rgba(20, 20, 25, 0.7);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  padding: 2.5rem 2rem;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.1);
  text-align: center;
  max-width: 420px;
  animation: float-in 0.6s cubic-bezier(0.1, 0.9, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.paywall-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 30px rgba(204, 255, 0, 0.6));
}
.paywall-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.paywall-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.paywall-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #a3cc00 100%);
  color: #000;
  font-weight: 900;
  font-size: 1.25rem;
  padding: 1.2rem 3rem;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.5);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  animation: pulse-glow 2s infinite;
  width: 100%;
}
.paywall-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.7);
}
@keyframes float-in { from { opacity: 0; transform: translateY(30px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse-glow { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.8); } 70% { box-shadow: 0 0 0 20px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
