/* ========================================
   EMAGRECIMENTO INTELIGENTE — MINICURSO
   CSS Principal
   ======================================== */

:root {
  --primary: #00c896;
  --primary-dark: #009e76;
  --primary-light: #e8faf5;
  --secondary: #1a1a2e;
  --accent: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --orange: #f97316;

  --bg: #f4f7f6;
  --card-bg: #ffffff;
  --text: #1a2332;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #00c896;

  --sidebar-w: 280px;
  --topbar-h: 64px;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --transition: all 0.25s ease;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.sidebar-logo i {
  font-size: 1.5rem;
  color: var(--primary);
}

.sidebar-logo span {
  font-size: 0.85rem;
  color: var(--sidebar-text);
  line-height: 1.3;
}

.sidebar-logo strong { color: #fff; }

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Progress bar sidebar */
.progress-bar-wrap {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.progress-label {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bar-bg {
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--primary);
  display: block;
  margin-top: 0.35rem;
}

/* Nav list */
.nav-list {
  list-style: none;
  padding: 1rem 0;
  flex: 1;
}

.nav-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--sidebar-text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  border-radius: 0;
  position: relative;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-btn.active {
  background: rgba(0,200,150,0.12);
  color: var(--primary);
  border-right: 3px solid var(--primary);
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.nav-btn.active .nav-icon {
  background: rgba(0,200,150,0.2);
}

.nav-label { flex: 1; font-weight: 500; }

.nav-check {
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-check.done { opacity: 1; }

/* ========== TOPBAR ========== */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
}

.topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  flex: 1;
}

.module-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  transition: var(--transition);
}

.module-section {
  display: none;
}

.module-section.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

/* ========== HERO SECTIONS ========== */
.module-hero {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.module-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,200,150,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.intro-hero { background: linear-gradient(135deg, #0a3d62 0%, #1a1a2e 100%); }
.m1-hero { background: linear-gradient(135deg, #0d4a3a 0%, #1a1a2e 100%); }
.m2-hero { background: linear-gradient(135deg, #4a2d0d 0%, #1a1a2e 100%); }
.m3-hero { background: linear-gradient(135deg, #2d0d4a 0%, #1a1a2e 100%); }
.m4-hero { background: linear-gradient(135deg, #4a0d0d 0%, #1a1a2e 100%); }
.m5-hero { background: linear-gradient(135deg, #0d2d4a 0%, #1a1a2e 100%); }
.appendix-hero { background: linear-gradient(135deg, #1a2d0a 0%, #1a1a2e 100%); }

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-tag {
  display: inline-block;
  background: rgba(0,200,150,0.2);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid rgba(0,200,150,0.3);
  margin-bottom: 1rem;
}

.module-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.highlight { color: var(--primary); }

.hero-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  max-width: 480px;
  margin-bottom: 2rem;
}

.text-underline {
  color: var(--primary);
  position: relative;
  display: inline-block;
  padding-bottom: 0.25rem;
}

.text-underline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-item strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-item span {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== CONTENT WRAP ========== */
.content-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ========== CONTENT CARD ========== */
.content-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

.content-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-card h2 i { color: var(--primary); font-size: 1.1rem; }

.content-card p { color: #374151; margin-bottom: 0.75rem; }

/* ========== BUTTONS ========== */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,200,150,0.35);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

.btn-large { padding: 1rem 2rem; font-size: 1rem; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239,68,68,0.35);
}

.enhanced-bmi-table {
  margin-top: 2rem;
  background: #f8fafc;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.bmi-table-full {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 1rem 0;
}

.bmi-table-full th,
.bmi-table-full td {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.92rem;
  color: #334155;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.bmi-table-full th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text);
}

.bmi-table-full tbody tr:hover {
  background: rgba(0,200,150,0.05);
}

/* Cores das faixas de IMC */
.bmi-table-full tbody tr.bmi-normal { background: #d1fae5; }
.bmi-table-full tbody tr.bmi-normal:hover { background: #a7f3d0; }

.bmi-table-full tbody tr.bmi-overweight { background: #fef3c7; }
.bmi-table-full tbody tr.bmi-overweight:hover { background: #fde68a; }

.bmi-table-full tbody tr.bmi-obesity1 { background: #fed7aa; }
.bmi-table-full tbody tr.bmi-obesity1:hover { background: #fdba74; }

.bmi-table-full tbody tr.bmi-obesity2 { background: #fca5a5; }
.bmi-table-full tbody tr.bmi-obesity2:hover { background: #f87171; }

.bmi-table-full tbody tr.bmi-obesity3 { background: #fecaca; }
.bmi-table-full tbody tr.bmi-obesity3:hover { background: #fca5a5; }

.bmi-table-full tbody tr.bmi-underweight-severe,
.bmi-table-full tbody tr.bmi-underweight,
.bmi-table-full tbody tr.bmi-underweight-mild {
  background: #dbeafe;
}
.bmi-table-full tbody tr.bmi-underweight-severe:hover,
.bmi-table-full tbody tr.bmi-underweight:hover,
.bmi-table-full tbody tr.bmi-underweight-mild:hover {
  background: #bfdbfe;
}

/* ========== MODULE NAV ========== */
.module-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

/* ========== GRIDS E LAYOUTS ========== */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.learning-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.learning-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.learning-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.learning-item h4 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.learning-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ========== CHECKLIST ========== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.check-item:hover { border-color: var(--primary); background: var(--primary-light); }

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
}

.check-item span { font-size: 0.9rem; color: var(--text); }

.check-item:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
}

.check-item:has(input:checked) span {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ========== TABLES ========== */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--secondary);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.data-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child { border-radius: 0 8px 0 0; }

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) { background: #f8fafc; }
.data-table tr:hover { background: var(--primary-light); }

.cal-col { font-weight: 700; color: var(--primary-dark); }

/* ========== TAGS / BADGES ========== */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag.green { background: #d1fae5; color: #065f46; }
.tag.blue { background: #dbeafe; color: #1e40af; }
.tag.purple { background: #ede9fe; color: #5b21b6; }
.tag.orange { background: #ffedd5; color: #9a3412; }
.tag.red { background: #fee2e2; color: #991b1b; }
.tag.gray { background: #f1f5f9; color: #475569; }

/* ========== INFO BOXES ========== */
.info-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin: 1rem 0;
  font-size: 0.875rem;
  align-items: flex-start;
}

.info-box i { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

.info-box.warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #78350f; }
.info-box.warning i { color: #f59e0b; }

.info-box.blue { background: #eff6ff; border-left: 4px solid var(--blue); color: #1e3a5f; }
.info-box.blue i { color: var(--blue); }

.info-box.green { background: var(--primary-light); border-left: 4px solid var(--primary); color: #064e3b; }
.info-box.green i { color: var(--primary); }

.info-box.purple { background: #f5f3ff; border-left: 4px solid var(--purple); color: #4c1d95; }
.info-box.purple i { color: var(--purple); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.info-grid .info-box {
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
}

.info-grid .info-box i { font-size: 1.5rem; margin-bottom: 0.25rem; }

.info-box.blue strong, .info-box.green strong, .info-box.warning strong, .info-box.purple strong {
  display: block;
  margin-bottom: 0.25rem;
}

.info-box p { margin: 0; font-size: 0.85rem; }

.highlight-box {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  margin: 1rem 0;
  align-items: flex-start;
}

.highlight-box i { color: var(--accent); font-size: 1.25rem; flex-shrink: 0; }
.highlight-box p { margin: 0; font-size: 0.875rem; color: #fff; }
.highlight-box strong { color: #fff; }

/* ========== COMPARE GRID ========== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.compare-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.compare-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.compare-header {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.compare-card.sema .compare-header { background: linear-gradient(135deg, #0d4a3a, #1a2a40); color: #fff; }
.compare-card.tirze .compare-header { background: linear-gradient(135deg, #2d0d4a, #1a2a40); color: #fff; }

.compare-header i { font-size: 1.5rem; color: var(--primary); margin-bottom: 0.25rem; }
.compare-header h3 { font-size: 1.1rem; font-weight: 700; }
.brand-names { font-size: 0.78rem; color: #94a3b8; }

.compare-list {
  list-style: none;
  padding: 1.25rem;
}

.compare-list li {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text);
}

.compare-list li:last-child { border-bottom: none; }
.compare-list li i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.text-gold { color: #f59e0b !important; }

.footnote { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ========== PILARES ALIMENTAÇÃO ========== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.pillar-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pillar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar-card.protein { border-top: 4px solid var(--primary); }
.pillar-card.veggies { border-top: 4px solid #22c55e; }
.pillar-card.fruits { border-top: 4px solid var(--orange); }
.pillar-card.hydration { border-top: 4px solid var(--blue); }

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.pillar-icon i { color: var(--primary); font-size: 1.3rem; }

.pillar-card h4 { font-weight: 700; font-size: 1rem; margin-bottom: 0.1rem; }
.pillar-card h5 { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.6rem; font-weight: 500; }
.pillar-card p { font-size: 0.82rem; color: #374151; margin-bottom: 0.75rem; }
.pillar-card ul { list-style: none; padding: 0; }
.pillar-card li { font-size: 0.82rem; padding: 0.2rem 0; color: #374151; }
.pillar-card li::before { content: '•'; color: var(--primary); margin-right: 0.4rem; }

/* ========== MACRO LAYOUT ========== */
.macro-layout {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.macro-chart-wrap { flex-shrink: 0; }

.macro-details { flex: 1; min-width: 220px; }
.macro-details h4 { font-weight: 700; margin-bottom: 1rem; }

.macro-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.macro-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 4px;
}

.protein-color { background: var(--primary); }
.carb-color { background: var(--blue); }
.fat-color { background: var(--accent); }

.macro-item strong { display: block; font-size: 0.9rem; margin-bottom: 0.15rem; }
.macro-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ========== CALCULATOR ========== */
.calorie-calculator {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
}

.calorie-calculator h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calorie-calculator h4 i { color: var(--primary); }

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.calc-inputs label {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text);
}

.calc-inputs input, .calc-inputs select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

.calc-result {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.bmi-calculator {
  background: #f8fafc;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.bmi-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.bmi-toggle-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  min-width: 120px;
}

.bmi-toggle-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1;
}

.bmi-toggle-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.bmi-toggle-btn.active,
.bmi-toggle-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bmi-inputs {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.bmi-result {
  margin-top: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(0, 200, 150, 0.15);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: inset 0 0 0 1px rgba(0, 200, 150, 0.04);
}

.bmi-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 0.75rem;
}

.bmi-result-header strong {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.bmi-result-header span {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
}

.bmi-result-body p {
  margin-bottom: 0.5rem;
  color: #334155;
  font-size: 0.95rem;
}

.bmi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bmi-history {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #334155;
  font-size: 0.92rem;
}

.bmi-history h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.bmi-history-item {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.bmi-history-item:last-child { border-bottom: none; }

.bmi-history-label {
  font-weight: 700;
  color: #475569;
}

.bmi-table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.bmi-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.bmi-table th,
.bmi-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  font-size: 0.92rem;
  color: #334155;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.bmi-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text);
}

.bmi-table tbody tr:last-child td {
  border-bottom: none;
}

.bmi-category-underweight {
  background-color: #e0f2fe;
}

.bmi-category-normal {
  background-color: #f0fdf4;
}

.bmi-category-overweight {
  background-color: #fef3c7;
}

.bmi-category-obesity1 {
  background-color: #fed7aa;
}

.bmi-category-obesity2 {
  background-color: #fecaca;
}

.bmi-category-obesity3 {
  background-color: #fee2e2;
}

.bmi-history-value {
  color: #0f172a;
}

.bmi-history-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.btn-danger-small {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.45rem;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.btn-danger-small i {
  font-size: 0.9rem;
}

.btn-danger-small:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}
.bmi-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 850px) {
  .bmi-inputs { grid-template-columns: 1fr; }
  .bmi-toggle-group { flex-direction: column; align-items: stretch; }
  .bmi-toggle-label { min-width: auto; }
}

/* ========== FILTER TABS ========== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: #fff;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== AVOID GRID ========== */
.avoid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.avoid-item {
  display: flex;
  gap: 0.75rem;
  background: #fff5f5;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #fee2e2;
  align-items: flex-start;
}

.avoid-item i { color: var(--danger); font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.avoid-item h5 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; color: #7f1d1d; }
.avoid-item p { font-size: 0.82rem; color: #374151; margin: 0; }

/* ========== STEPS ========== */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  margin: 1.25rem 0;
}

.steps-container::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), rgba(0,200,150,0.1));
}

.step-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  position: relative;
  align-items: flex-start;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-content {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  flex: 1;
  border: 1px solid var(--border);
  margin-top: 4px;
}

.step-content h4 { font-weight: 700; margin-bottom: 0.5rem; font-size: 0.95rem; }
.step-content p { font-size: 0.875rem; color: #374151; margin: 0; }

/* ========== EXERCISE PILLARS ========== */
.exercise-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.ex-pillar {
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.ex-pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ex-pillar.strength { border-color: var(--primary); }
.ex-pillar.cardio { border-color: var(--blue); }
.ex-pillar.mobility { border-color: var(--purple); }

.ex-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.ex-pillar.strength .ex-icon i { color: var(--primary); font-size: 1.5rem; }
.ex-pillar.cardio .ex-icon i { color: var(--blue); font-size: 1.5rem; }
.ex-pillar.mobility .ex-icon i { color: var(--purple); font-size: 1.5rem; }

.ex-pillar h4 { font-weight: 700; font-size: 1rem; margin-bottom: 0.25rem; }

.freq-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  background: #f1f5f9;
  color: var(--text-muted);
}

.ex-pillar p { font-size: 0.85rem; color: #374151; margin-bottom: 0.75rem; }
.ex-pillar ul { list-style: none; padding: 0; }
.ex-pillar li { font-size: 0.82rem; padding: 0.25rem 0; color: #374151; border-bottom: 1px solid var(--border); }
.ex-pillar li:last-child { border-bottom: none; }
.ex-pillar li::before { content: '→'; margin-right: 0.4rem; }
.ex-pillar.strength li::before { color: var(--primary); }
.ex-pillar.cardio li::before { color: var(--blue); }
.ex-pillar.mobility li::before { color: var(--purple); }

/* ========== COMPARE VISUAL (Barras) ========== */
.compare-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.compare-bar h4 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.bar-item {
  margin-bottom: 0.75rem;
}

.bar-item span {
  font-size: 0.78rem;
  color: var(--sidebar-bg);
  display: block;
  margin-bottom: 0.3rem;
}

.bar-fill {
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.8s ease;
}

.fat-bar { background: linear-gradient(90deg, var(--primary), #00a87a); }
.muscle-bar { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.muscle-bar.danger { background: linear-gradient(90deg, var(--danger), #dc2626); }

/* ========== WARNING LIST ========== */
.warning-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.warning-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff7ed;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  border-left: 3px solid var(--orange);
  color: #7c2d12;
}

.warning-item i { color: var(--orange); flex-shrink: 0; }

/* ========== ACCORDION ========== */
.exercise-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.acc-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

.acc-header {
  width: 100%;
  background: #f8fafc;
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.acc-header:hover { background: var(--primary-light); }
.acc-header span { display: flex; align-items: center; gap: 0.5rem; }
.acc-header i { color: var(--primary); transition: transform 0.3s; }
.acc-header.open i { transform: rotate(180deg); }

.acc-body {
  display: none;
  padding: 1.25rem;
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: #374151;
}

.acc-body.open { display: block; }
.acc-body ol { padding-left: 1.25rem; }
.acc-body li { padding: 0.3rem 0; }
.acc-body p { margin-bottom: 0.6rem; }

/* ========== SIDE EFFECTS ========== */
.side-effects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.se-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.se-header {
  padding: 1rem 1.25rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.se-card.common .se-header { background: #f0fdf4; }
.se-card.moderate .se-header { background: #fffbeb; }
.se-card.severe .se-header { background: #fef2f2; }

.se-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  margin-bottom: 0.4rem;
}

.se-badge.common { background: #d1fae5; color: #065f46; }
.se-badge.moderate { background: #fef3c7; color: #92400e; }
.se-badge.severe { background: #fee2e2; color: #991b1b; }

.se-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.se-card.severe .se-header h4 i { color: var(--danger); }

.se-card p {
  font-size: 0.82rem;
  padding: 0.5rem 1.25rem 0;
  margin: 0;
  color: #374151;
}

.se-tips { padding: 0.75rem 1.25rem 1.25rem; }
.se-tips h5 { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.se-tips ul { list-style: none; padding: 0; }
.se-tips li { font-size: 0.82rem; padding: 0.25rem 0; border-bottom: 1px solid var(--border); color: #374151; }
.se-tips li:last-child { border-bottom: none; }
.se-tips li::before { content: '✓'; color: var(--primary); margin-right: 0.4rem; }

/* ========== DOSE TABLE ========== */
.dose-table td:nth-child(2) { color: var(--primary-dark); font-weight: 600; }
.dose-table td:nth-child(3) { color: var(--purple); font-weight: 600; }

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 2rem;
}

.timeline-badge {
  position: absolute;
  left: -16px;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px #fff;
}

.timeline-content {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.timeline-content h4 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.timeline-content p { font-size: 0.875rem; color: #374151; margin-bottom: 0.4rem; }
.timeline-content p strong { color: var(--text); }

/* ========== MAINTENANCE PILLARS ========== */
.pillars-maintenance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 900px) {
  .pillars-maintenance {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .pillars-maintenance {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.pm-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 2px solid var(--border);
  min-height: 320px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #00a87a);
}

.pm-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,200,150,0.15);
}

.pm-card:hover { border-color: var(--primary); transform: translateX(4px); }

.pm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pm-number {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #00a87a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
}

.pm-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #00a87a);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,200,150,0.3);
}

.pm-icon i {
  font-size: 1.5rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}



.pm-card > div { flex: 1; }

.pm-card h4 { 
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.2;
}

.pm-card p { 
  font-size: 0.95rem; 
  color: #374151; 
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.pm-tips {
  background: rgba(0,200,150,0.05);
  border-radius: 10px;
  padding: 1rem;
  border-left: 4px solid var(--primary);
}

.pm-tips strong { 
  font-size: 0.85rem; 
  display: block; 
  margin-bottom: 0.6rem; 
  color: var(--primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pm-tips ul { list-style: none; padding: 0; }
.pm-tips li { 
  font-size: 0.9rem; 
  color: #374151; 
  padding: 0.4rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.pm-tips li::before { 
  content: '✓';
  color: var(--primary);
  font-weight: bold;
  font-size: 0.85rem;
  position: absolute;
  left: 0;
  top: 0.4rem;
}

/* ========== INSIGHT BOX ========== */
.insight-box {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  color: #ffffff;
  margin: 1.5rem 0;
  align-items: flex-start;
}

.insight-box i { font-size: 1.5rem; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.insight-box h4 { font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.insight-box p { font-size: 0.875rem;color: var(--accent) margin: 0; }
.insight-box strong { color: var(--primary); }

/* ========== INDICATORS TABLE ========== */
.indicators-table td:nth-child(2) { font-weight: 700; color: var(--primary-dark); }
.indicators-table td:nth-child(3) { color: var(--text-muted); font-size: 0.82rem; }
.indicators-table td:nth-child(4) { font-size: 0.82rem; color: #374151; }
.indicators-table td i { color: var(--primary); margin-right: 0.35rem; }

/* ========== QUIZ ========== */
.quiz-card { background: linear-gradient(135deg, #f0fdf4, #fff); border: 2px solid var(--primary); }

.quiz-container { margin-top: 1rem; }

.quiz-question { display: none; }
.quiz-question.active { display: block; }

.q-text {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.q-btn {
  padding: 0.75rem 1rem;
  text-align: left;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.q-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.q-btn.correct {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.q-btn.incorrect {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.q-feedback {
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  min-height: 1rem;
  margin-top: 0.25rem;
}

.q-feedback.success { background: #d1fae5; color: #065f46; }
.q-feedback.error { background: #fee2e2; color: #991b1b; }

.quiz-result {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
}

.quiz-result.good { background: #d1fae5; color: #065f46; }
.quiz-result.ok { background: #fef3c7; color: #92400e; }
.quiz-result.poor { background: #fee2e2; color: #991b1b; }

/* ========== COMPLETION CARD ========== */
.completion-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: none;
  color: #fff;
  text-align: center;
}

.completion-content { padding: 1.5rem; }

.completion-icon {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.completion-card h2 {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.completion-card p { color: #94a3b8; max-width: 500px; margin: 0 auto 1rem; }

/* ========== SATIETY TABLE ========== */
.satiety-table-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.satiety-column {
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.satiety-column.high { background: #f0fdf4; border-top: 4px solid #22c55e; }
.satiety-column.medium { background: #fffbeb; border-top: 4px solid var(--accent); }
.satiety-column.low { background: #fef2f2; border-top: 4px solid var(--danger); }

.satiety-column h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.satiety-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.satiety-column ul { list-style: none; padding: 0; }
.satiety-column li { font-size: 0.82rem; padding: 0.3rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); color: #374151; }
.satiety-column li:last-child { border-bottom: none; }

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green { background: #22c55e; }
.dot.yellow { background: var(--accent); }
.dot.red { background: var(--danger); }

/* ========== DIARY ========== */
.diary-form {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.diary-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.diary-inputs label {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text);
}

.diary-inputs label.full-width { grid-column: 1 / -1; }

.diary-inputs input, .diary-inputs select, .diary-inputs textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

.diary-inputs textarea {
  min-height: 80px;
  resize: vertical;
}

.diary-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

.diary-entry {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.diary-entry-meta { font-size: 0.78rem; color: var(--text-muted); }
.diary-entry-data { display: flex; gap: 1rem; flex-wrap: wrap; }
.diary-entry-field strong { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); display: block; }
.diary-entry-field span { font-weight: 700; color: var(--text); }
.diary-delete { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.8rem; }

/* ========== REFERENCES ========== */
.references-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.ref-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: #374151;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ref-item:last-child { border-bottom: none; }

.ref-num {
  min-width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.ref-item em { color: var(--text-muted); }

/* ========== OVERLAY ========== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.overlay.show { display: block; }

/* ========== CHART CONTAINER ========== */
.chart-container { position: relative; width: 100%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close { display: block; }
  .menu-toggle { display: block; }

  .topbar { left: 0; }
  .main-content { margin-left: 0; }

  .compare-grid { grid-template-columns: 1fr; }
  .compare-visual { grid-template-columns: 1fr; }
  .satiety-table-wrap { grid-template-columns: 1fr; }
  .macro-layout { flex-direction: column; }
  .calc-inputs { grid-template-columns: 1fr; }
  .pm-card { flex-direction: column; }
  .pm-number { width: auto; }
}

@media (max-width: 600px) {
  .content-card { padding: 1.25rem; }
  .content-wrap { padding: 1rem 0.75rem 3rem; }
  .module-hero { padding: 2.5rem 1.25rem; }
  .module-hero h1 { font-size: 1.6rem; }
  .hero-stats { gap: 1.25rem; }
  .pillars-grid { grid-template-columns: 1fr; }
  .exercise-pillars { grid-template-columns: 1fr; }
  .side-effects-grid { grid-template-columns: 1fr; }
  .learning-grid { grid-template-columns: 1fr; }
  .avoid-grid { grid-template-columns: 1fr; }
  .steps-container::before { left: 20px; }
  .step-num { width: 40px; height: 40px; font-size: 0.95rem; }
  .module-nav { flex-direction: column; gap: 0.75rem; }
  .module-nav button { width: 100%; justify-content: center; }
  .meal-table td, .meal-table th { font-size: 0.75rem; padding: 0.5rem 0.6rem; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========================================
   FERRAMENTA UNIFICADA — Diário Alimentar Inteligente
   ======================================== */
.subtool-box {
  padding: 1.25rem; margin-bottom: 1.5rem;
  background: #f8fafc; border-radius: 14px; border: 1px solid #e2e8f0;
}
.subtool-box:last-child { margin-bottom: 0; }
.subtool-box h4 { font-size: 1rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.subtool-box h4 i { color: var(--primary); }

.calgoal-inputs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem; margin-bottom: 1rem;
}
.calgoal-inputs label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: #374151; }
.calgoal-inputs input, .calgoal-inputs select {
  padding: 0.55rem 0.7rem; border-radius: 8px; border: 1px solid #d1d5db; font-size: 1rem; font-weight: 400;
}

.food-search-input {
  width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
  border: 1px solid #d1d5db; font-size: 1rem; margin-bottom: 0.5rem;
}
.food-search-results {
  border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 0.75rem;
  max-height: 340px; overflow-y: auto; background: white;
}
.food-result-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid #f1f5f9;
}
.food-result-row:last-child { border-bottom: none; }
.food-result-info { flex: 1; display: flex; flex-direction: column; }
.food-result-info strong { font-size: 0.875rem; }
.food-result-info span { font-size: 0.78rem; color: #64748b; }
.food-result-qty { width: 60px; padding: 0.4rem; border-radius: 6px; border: 1px solid #d1d5db; text-align: center; }
.food-result-add { padding: 0.4rem 0.7rem; }

.manual-food-details { margin-top: 0.5rem; }
.manual-food-details summary { cursor: pointer; font-size: 0.85rem; color: var(--primary); font-weight: 600; }
.manual-food-form {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end;
  margin-top: 0.85rem;
}
.manual-food-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; font-weight: 600; color: #374151; }
.manual-food-form input {
  padding: 0.5rem 0.7rem; border-radius: 8px; border: 1px solid #d1d5db; font-size: 1rem;
}
.manual-food-form input#manual-food-name { min-width: 220px; }

.food-diary-goal-row { display: flex; gap: 0.75rem; align-items: flex-end; margin-bottom: 1rem; flex-wrap: wrap; }

.diary-list-header { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
.btn-small { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

.weekly-tracker {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem; margin-top: 0.5rem;
}
.weekday-cell {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.75rem 0.4rem; border-radius: 10px;
  background: white; border: 1px solid #e2e8f0;
  cursor: pointer; transition: all 0.15s ease;
}
.weekday-cell:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
.weekday-cell.future { cursor: not-allowed; opacity: 0.5; }
.weekday-cell.future:hover { border-color: #e2e8f0; transform: none; box-shadow: none; }
.weekday-cell.is-today { border-color: var(--primary); border-width: 2px; }
.weekday-label { font-size: 0.72rem; font-weight: 700; color: #64748b; text-transform: uppercase; }
.weekday-num { font-size: 0.95rem; font-weight: 700; color: #1e293b; }
.weekday-status { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.weekday-cell.pending .weekday-status { background: #f1f5f9; color: #94a3b8; }
.weekday-cell.ok .weekday-status { background: var(--primary-light); color: var(--primary); }
.weekday-cell.over .weekday-status { background: #fef2f2; color: #ef4444; }

@media (max-width: 600px) {
  .weekly-tracker { grid-template-columns: repeat(4, 1fr); }
}

.weekly-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* ========================================
   IDENTIFICAÇÃO DO COMPRADOR — proteção de conteúdo
   ======================================== */
#buyer-gate-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(15, 23, 42, 0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.buyer-gate-box {
  background: white; border-radius: 16px; padding: 2rem;
  max-width: 420px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.buyer-gate-icon { font-size: 2.25rem; color: var(--primary); margin-bottom: 0.75rem; }
.buyer-gate-box h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.buyer-gate-box p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.buyer-gate-box label { display: block; font-size: 0.8rem; font-weight: 700; color: #374151; margin-bottom: 0.35rem; }
.buyer-gate-box input {
  width: 100%; padding: 0.65rem 0.85rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.buyer-gate-error { color: #ef4444 !important; font-size: 0.8rem !important; margin-bottom: 0.75rem !important; }
.buyer-gate-box .btn-primary { width: 100%; justify-content: center; }

#buyer-watermark {
  position: fixed; inset: 0; z-index: 800;
  pointer-events: none; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotate(-22deg) scale(1.4);
  opacity: 0.025;
}
.wm-row {
  white-space: nowrap; font-size: 0.72rem; font-weight: 400;
  color: #0f172a; letter-spacing: 0.02em;
}

.buyer-footer {
  padding: 0.85rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}
.buyer-footer-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; color: #64748b; margin-bottom: 0.2rem; }
.buyer-footer-name { font-size: 0.8rem; font-weight: 700; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buyer-footer-email { font-size: 0.72rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0.4rem; }
.buyer-footer-change {
  background: none; border: none; color: var(--primary); font-size: 0.7rem;
  cursor: pointer; padding: 0; text-decoration: underline;
}
