/* ─────────────────────────────────────────────────────────────────────────
   NutriGuide — Main Stylesheet
   Design reference: micronutri-gmrhsbpg.manus.space
   ───────────────────────────────────────────────────────────────────────── */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --color-bg:           #F7FAF8;
  --color-surface:      #FFFFFF;
  --color-border:       #D1E4D8;
  --color-text:         #1A2B2A;
  --color-muted:        #6B8A7A;
  --color-primary:      #2D6A4F;
  --color-primary-dark: #1B5E35;
  --color-primary-light:#3A8F66;
  --color-accent:       #D4A84B;
  --color-accent-dark:  #B88D35;
  --color-muted-bg:     #EFF4F1;
  --color-danger:       #C0392B;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.07);
  --shadow:     0 4px 16px rgba(0,0,0,.08);
  --shadow-md:  0 8px 28px rgba(0,0,0,.12);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.14);

  --transition: .2s cubic-bezier(.4,0,.2,1);
  --container:  1280px;
  --gutter:     clamp(16px, 4vw, 48px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
}
img, video { max-width: 100%; display: block; }
svg { max-width: 100%; display: inline-block; vertical-align: middle; }
.hero svg, .cat-icon, .info-box svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; }
h1,h2,h3,h4,h5,h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: 64px; }
.section-sm { padding-block: 40px; }

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.site-branding { flex-shrink: 0; }
.site-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-title span { font-weight: 400; color: var(--color-muted); font-size: .9rem; }
.site-tagline { font-size: .72rem; color: var(--color-muted); margin-top: 1px; }

/* Primary nav */
.nav-primary { flex: 1 1 0%; min-width: 0; overflow: hidden; }
.nav-primary ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-primary a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-primary a:hover,
.nav-primary .current-menu-item a {
  color: var(--color-primary);
  background: var(--color-muted-bg);
}

/* Header search */
.header-search { position: relative; flex-shrink: 1; }
.header-search input {
  width: 180px;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: .85rem;
  background: var(--color-muted-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), width var(--transition);
}
.header-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,.15);
  width: 220px;
  background: #fff;
}
.header-search .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--color-muted-bg); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO (Front page)
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0F3D2A 0%, var(--color-primary) 55%, var(--color-primary-light) 100%);
  color: #fff;
  padding-block: 96px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: rgba(255,255,255,.9);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  max-width: 800px;
  margin-inline: auto;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 36px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  font-size: .95rem;
  font-weight: 600;
  transition: background var(--transition), transform .15s, box-shadow var(--transition);
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(212,168,75,.4);
}
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212,168,75,.5); }
.btn-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-outline:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.btn-green { background: var(--color-primary); color: #fff; }
.btn-green:hover { background: var(--color-primary-dark); transform: translateY(-2px); }

.hero-disclaimer {
  margin-top: 40px;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: .78rem;
  color: rgba(255,255,255,.75);
  max-width: 600px;
  text-align: left;
  line-height: 1.5;
}
.hero-disclaimer svg { flex-shrink: 0; margin-top: 1px; }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY CARDS (front page)
   ═══════════════════════════════════════════════════════════════════════════ */
.section-heading { text-align: center; margin-bottom: 48px; }
.section-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--color-text);
  margin-bottom: 12px;
}
.section-heading p { color: var(--color-muted); font-size: 1.05rem; max-width: 560px; margin-inline: auto; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.cat-icon { font-size: 2rem; margin-bottom: 14px; line-height: 1; }
.cat-card h3 { font-size: 1rem; color: var(--color-primary-dark); margin-bottom: 8px; }
.cat-card p { font-size: .83rem; color: var(--color-muted); line-height: 1.55; }

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.features-section { background: var(--color-surface); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px;
}
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--color-muted-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.2rem;
}
.feature-item h3 { font-size: .95rem; margin-bottom: 6px; color: var(--color-text); }
.feature-item p { font-size: .83rem; color: var(--color-muted); line-height: 1.55; }

/* ═══════════════════════════════════════════════════════════════════════════
   CTA BAND
   ═══════════════════════════════════════════════════════════════════════════ */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  text-align: center;
  padding-block: 64px;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.8); margin-bottom: 28px; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   REPERTOIRE (Archive)
   ═══════════════════════════════════════════════════════════════════════════ */
.archive-header { padding-block: 48px 32px; }
.archive-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 8px; }
.archive-header p { color: var(--color-muted); font-size: 1rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  align-items: center;
}
.filter-search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.filter-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: .9rem;
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
.filter-search .fi { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--color-muted); }

.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tag:hover, .filter-tag.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Alpha nav */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.alpha-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-muted-bg);
  transition: all var(--transition);
}
.alpha-nav a:hover { background: var(--color-primary); color: #fff; }
.alpha-nav a.inactive { color: var(--color-border); background: transparent; pointer-events: none; }

/* Letter group */
.letter-group { margin-bottom: 48px; }
.letter-anchor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.letter-char {
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}
.letter-line { flex: 1; height: 1px; background: var(--color-border); }

/* Pathologie cards grid */
.patho-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.patho-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
}
.patho-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-primary);
}
.patho-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
  font-weight: 600;
}
.patho-card-system {
  display: inline-block;
  font-size: .72rem;
  font-weight: 500;
  background: var(--color-muted-bg);
  color: var(--color-primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}
.patho-card-excerpt { font-size: .82rem; color: var(--color-muted); line-height: 1.5; margin-bottom: 12px; }
.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.proof-fort { background: #D1FAE5; color: #065F46; }
.proof-modere { background: #FEF3C7; color: #92400E; }
.proof-preliminaire { background: #F3F4F6; color: #4B5563; }
.patho-arrow {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--color-border);
  transition: color var(--transition), transform var(--transition);
  font-size: 1.1rem;
}
.patho-card:hover .patho-arrow { color: var(--color-primary); transform: translateY(-50%) translateX(3px); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--color-muted);
}
.empty-state svg { margin-inline: auto; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--color-text); }

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE PATHOLOGIE
   ═══════════════════════════════════════════════════════════════════════════ */
.patho-header {
  background: linear-gradient(135deg, #0F3D2A, var(--color-primary));
  color: #fff;
  padding-block: 52px 44px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.65); transition: color var(--transition); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.35); }
.patho-header h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); color: #fff; margin-bottom: 14px; }
.patho-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: .78rem;
  color: rgba(255,255,255,.9);
}
.patho-excerpt-header { color: rgba(255,255,255,.8); margin-top: 16px; font-size: .95rem; max-width: 700px; }

/* Symptoms box */
.symptoms-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.symptoms-box h3 { font-size: 1rem; margin-bottom: 12px; color: var(--color-primary-dark); }
.symptom-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.symptom-tag {
  background: var(--color-muted-bg);
  color: var(--color-text);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .8rem;
}

/* Protocol tabs */
.tabs-wrapper { margin-bottom: 32px; }
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 500;
  color: var(--color-muted);
  background: var(--color-muted-bg);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.tab-btn:hover { color: var(--color-primary); background: #E0EEE7; }
.tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(45,106,79,.25);
}
.tab-panel { display: none; animation: fadeIn .25s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.protocol-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.protocol-content h4 {
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.protocol-content ul { padding-left: 0; }
.protocol-content li {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-muted-bg);
  font-size: .9rem;
  line-height: 1.55;
}
.protocol-content li:last-child { border-bottom: none; }
.protocol-content li::before {
  content: '▸';
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 1px;
}
.protocol-content strong { color: var(--color-primary-dark); }
.protocol-empty {
  text-align: center;
  padding: 40px;
  color: var(--color-muted);
  font-size: .9rem;
}

/* Interactions & References */
.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.info-box.warning { border-left: 4px solid #F59E0B; }
.info-box h3 {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-box ul { padding-left: 0; }
.info-box li {
  padding: 6px 0 6px 16px;
  position: relative;
  font-size: .875rem;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-muted-bg);
  line-height: 1.5;
}
.info-box li:last-child { border-bottom: none; }
.info-box li::before { content: '•'; position: absolute; left: 0; color: var(--color-primary); }
.references-list {
  counter-reset: ref;
  padding-left: 0;
}
.references-list li {
  counter-increment: ref;
  padding: 6px 0 6px 32px;
  position: relative;
  font-size: .8rem;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-muted-bg);
  font-style: italic;
}
.references-list li::before {
  content: counter(ref);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  background: var(--color-muted-bg);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  font-style: normal;
}

/* Sidebar layout for single */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  padding-block: 40px;
}
.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
}
.sidebar-card h4 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-ask-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  transition: opacity var(--transition), transform .15s;
}
.sidebar-ask-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════════════════
   NUTRIBOT
   ═══════════════════════════════════════════════════════════════════════════ */
.nutribot-page { padding-block: 48px; }
.nutribot-header { text-align: center; margin-bottom: 40px; }
.nutribot-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.nutribot-header p { color: var(--color-muted); }

.chat-wrap {
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
}
.chat-header {
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.chat-header-info strong { font-size: 1.05rem; display: block; }
.chat-header-info small { opacity: .8; font-size: .78rem; }
.online-dot {
  width: 8px; height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }

.chat-messages {
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  padding: 24px;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:none;} }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: .88rem;
  line-height: 1.6;
}
.chat-msg.bot .chat-bubble {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px 18px 18px 18px;
  color: var(--color-text);
}
.chat-msg.user .chat-bubble {
  background: var(--color-primary);
  color: #fff;
  border-radius: 18px 4px 18px 18px;
}
.chat-msg .chat-time { font-size: .68rem; color: var(--color-muted); }
.chat-msg.user .chat-time { text-align: right; }
.typing-indicator { display: flex; gap: 4px; padding: 4px 0; }
.typing-indicator span {
  width: 7px; height: 7px;
  background: var(--color-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100%{transform:none;opacity:.5;} 30%{transform:translateY(-6px);opacity:1;} }

.suggested-questions {
  padding: 16px 24px;
  background: var(--color-muted-bg);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.suggested-questions p { width: 100%; font-size: .75rem; color: var(--color-muted); margin-bottom: 4px; font-weight: 500; }
.sq-btn {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: .78rem;
  color: var(--color-primary);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition);
}
.sq-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.chat-input-row {
  display: flex;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.chat-input-row input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: .9rem;
  background: transparent;
  color: var(--color-text);
}
.chat-input-row input::placeholder { color: var(--color-muted); }
.chat-send-btn {
  padding: 12px 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0;
  font-size: .875rem;
  font-weight: 600;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-send-btn:hover { background: var(--color-primary-dark); }
.chat-send-btn:disabled { opacity: .6; cursor: not-allowed; }
.chat-disclaimer {
  text-align: center;
  font-size: .68rem;
  color: var(--color-muted);
  padding: 8px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-muted-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.search-page { padding-block: 56px; }
.search-hero { text-align: center; margin-bottom: 40px; }
.search-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.search-hero p { color: var(--color-muted); }
.search-form-big {
  max-width: 640px;
  margin-inline: auto;
  position: relative;
  margin-bottom: 32px;
}
.search-form-big input {
  width: 100%;
  padding: 16px 56px 16px 22px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  background: var(--color-surface);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form-big input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(45,106,79,.12);
}
.search-form-big button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .875rem;
  font-weight: 600;
  transition: background var(--transition);
}
.search-form-big button:hover { background: var(--color-primary-dark); }

.search-results-count { font-size: .9rem; color: var(--color-muted); margin-bottom: 24px; }
.search-results-count strong { color: var(--color-text); }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0D2B1E;
  color: rgba(255,255,255,.7);
  padding-block: 56px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .site-title { color: #fff; font-size: 1.1rem; }
.footer-brand p { font-size: .85rem; margin-top: 12px; max-width: 300px; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: .85rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; font-family: 'Inter', sans-serif; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .85rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .78rem;
}
.footer-bottom a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-bottom a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   DISCLAIMER BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.disclaimer-banner {
  background: #FFFBEB;
  border-bottom: 1px solid #F59E0B;
  padding: 10px 0;
  font-size: .78rem;
  color: #92400E;
  text-align: center;
}
.disclaimer-banner a { color: #92400E; font-weight: 600; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   GENERIC PAGE & 404
   ═══════════════════════════════════════════════════════════════════════════ */
.page-content { padding-block: 56px; max-width: 820px; }
.page-content h1 { margin-bottom: 24px; }
.page-content p, .page-content li { color: var(--color-muted); line-height: 1.7; margin-bottom: 12px; }

.error-page { padding-block: 80px; text-align: center; }
.error-page .error-code { font-size: 8rem; font-weight: 800; color: var(--color-primary); opacity: .15; line-height: 1; font-family: 'Playfair Display', serif; }
.error-page h1 { font-size: 2rem; margin-bottom: 12px; }
.error-page p { color: var(--color-muted); margin-bottom: 28px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile-auth-drawer: hidden on desktop, shown in mobile nav */
.mobile-auth-drawer { display: none; }

/* ── 1100px: compact header ── */
@media (max-width: 1100px) {
  .header-search input { width: 140px; }
  .header-search input:focus { width: 180px; }
  .nav-primary a { padding: 5px 8px; font-size: .78rem; }
}

/* ── 1024px: tablet landscape ── */
@media (max-width: 1024px) {
  .section { padding-block: 48px; }
  .single-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 900px: hide header search ── */
@media (max-width: 900px) {
  .header-search { display: none; }
}

/* ── 768px: mobile ── */
@media (max-width: 768px) {
  .nav-primary, .header-search { display: none; }
  .nav-toggle { display: flex; }

  /* Mobile nav drawer */
  .mobile-nav-open .nav-primary {
    display: block;
    position: fixed;
    top: 68px; right: 0; bottom: 0; left: 0;
    background: var(--color-surface);
    padding: 20px var(--gutter) 40px;
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .mobile-nav-open .nav-primary ul {
    flex-direction: column;
    gap: 2px;
  }
  .mobile-nav-open .nav-primary a {
    font-size: .95rem;
    padding: 13px 16px;
    display: block;
    border-radius: var(--radius);
    color: var(--color-text);
  }
  .mobile-nav-open .nav-primary .current-menu-item a {
    background: var(--color-muted-bg);
    color: var(--color-primary);
  }

  /* Auth links in mobile drawer */
  .mobile-nav-open .mobile-auth-drawer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
  }
  .mobile-auth-drawer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
  }
  .mobile-auth-drawer .mob-login {
    color: var(--color-primary);
    border: 1.5px solid var(--color-border);
  }
  .mobile-auth-drawer .mob-login:hover { background: var(--color-muted-bg); }
  .mobile-auth-drawer .mob-register {
    background: var(--color-primary);
    color: #fff;
    justify-content: center;
    font-weight: 600;
  }
  .mobile-auth-drawer .mob-register:hover { background: var(--color-primary-dark); }
  .mobile-auth-drawer .mob-profile {
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
  }
  .mobile-auth-drawer .mob-logout {
    color: var(--color-danger);
    font-size: .88rem;
    padding: 8px 16px;
  }

  /* Compact header auth (icon-only on mobile) */
  .header-auth { gap: 4px; }
  .header-auth .auth-label { display: none; }
  .header-login  { padding: 8px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }
  .header-register { padding: 8px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }
  .header-user { padding: 4px 8px 4px 4px; gap: 6px; }
  .header-user .user-name { display: none; }

  /* Section spacing */
  .section { padding-block: 40px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading p { font-size: .9rem; }

  /* Grids */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .patho-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero-stats { gap: 20px; }
  .hero-badge { font-size: .72rem; }

  /* Single pathologie */
  .patho-header { padding-block: 36px 28px; }
  .single-layout { padding-block: 24px; gap: 20px; }
  .protocol-content { padding: 18px 16px; }
  .tab-nav {
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn { padding: 7px 10px; font-size: .75rem; white-space: nowrap; flex-shrink: 0; }

  /* NutriBot chat */
  .nutribot-page { padding-block: 32px; }
  .chat-messages { min-height: 220px; max-height: 340px; padding: 16px; }
  .chat-input-row input { padding: 14px 16px; font-size: .88rem; }

  /* Profile */
  .profile-page { padding-block: 24px 48px; }
  .profile-section { padding: 20px; }
  .profile-header { padding: 20px; }

  /* Archive/Repertoire */
  .archive-header { padding-block: 32px 20px; }
  .filter-bar { gap: 12px; }
  .alpha-nav { gap: 4px; margin-bottom: 24px; }
  .alpha-nav a { width: 30px; height: 30px; font-size: .75rem; }
}

/* ── 600px: small phones ── */
@media (max-width: 600px) {
  /* Header */
  .site-title span { display: none; }

  /* Sections */
  .section { padding-block: 32px; }
  .cta-band { padding-block: 40px; }

  /* Grids */
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .hero-stat-value { font-size: 1.6rem; }

  /* Auth */
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; border-radius: var(--radius-lg); }
  .auth-page { padding: 20px var(--gutter); min-height: calc(100vh - 100px); }

  /* Profile */
  .profile-header { padding: 16px; flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Footer */
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 8px; }

  /* Alpha nav */
  .alpha-nav a { width: 26px; height: 26px; font-size: .68rem; }

  /* Filter */
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: 0; }
  .filter-tags { flex-wrap: wrap; }

  /* Chat */
  .chat-header { padding: 12px 16px; gap: 10px; }
  .chat-avatar { width: 36px; height: 36px; font-size: 1.1rem; }
  .chat-header-info strong { font-size: .9rem; }
  .suggested-questions { padding: 10px 14px; }
  .sq-btn { font-size: .72rem; padding: 5px 10px; }

  /* Single patho */
  .patho-header h1 { font-size: clamp(1.3rem, 6vw, 2rem); }
  .sidebar-card { margin-bottom: 12px; }
}

/* ── 480px: very small phones ── */
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 56px 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-stat-value { font-size: 1.4rem; }
  .patho-header { padding-block: 28px 18px; }
  .patho-header h1 { font-size: 1.35rem; }
  .single-layout { padding-block: 20px; }
  .archive-header h1 { font-size: 1.5rem; }
  .search-form-big input { padding: 14px 50px 14px 18px; font-size: .9rem; }
  .profile-grid { gap: 16px; }
  .auth-card { padding: 20px 16px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   AUTH PAGES (Login / Register)
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px var(--gutter);
  background: var(--color-bg);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-card-wide { max-width: 640px; }

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
}
.auth-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.auth-header p { color: var(--color-muted); font-size: .9rem; }

.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.auth-alert-error   { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.auth-alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }

/* Form groups */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.label-link { font-weight: 400; color: var(--color-primary); font-size: .8rem; }
.label-link:hover { text-decoration: underline; }
.required { color: #EF4444; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap input:not(:placeholder-shown):valid { border-color: #86EFAC; }
.input-wrap input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
.input-wrap input:disabled { background: var(--color-muted-bg); cursor: not-allowed; color: var(--color-muted); }
.input-wrap input[type="password"] { padding-right: 44px; }
.input-icon {
  position: absolute;
  left: 12px;
  color: var(--color-muted);
  pointer-events: none;
}
/* For inputs without icon */
.input-wrap input:first-child:not([type="password"]) { padding-left: 14px; }
.toggle-pass {
  position: absolute;
  right: 12px;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.toggle-pass:hover { color: var(--color-primary); }

.password-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 6px;
  background: var(--color-border);
  overflow: hidden;
  transition: all var(--transition);
}
.password-strength::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.pass-weak   .password-strength::after { width: 33%; background: #EF4444; }
.pass-medium .password-strength::after { width: 66%; background: #F59E0B; }
.pass-strong .password-strength::after { width: 100%; background: #22C55E; }

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .875rem;
  color: var(--color-muted);
  user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  background: var(--color-surface);
}
.checkbox-label input:checked + .checkmark {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.checkbox-label input:checked + .checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform .15s, box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(45,106,79,.3);
  margin-top: 4px;
}
.btn-auth:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45,106,79,.35); }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .875rem;
  color: var(--color-muted);
}
.auth-footer a { color: var(--color-primary); font-weight: 600; margin-left: 4px; }
.auth-footer a:hover { text-decoration: underline; }

/* Header auth link */
.header-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.header-auth a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
}
.header-auth a svg { display: inline-block; flex-shrink: 0; }
.header-login {
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
}
.header-login:hover { border-color: var(--color-primary); background: var(--color-muted-bg); }
.header-register {
  background: var(--color-primary);
  color: #fff !important;
  border: 1.5px solid var(--color-primary);
}
.header-register:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: .82rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.header-user:hover { border-color: var(--color-primary); background: var(--color-muted-bg); }
.user-avatar-sm {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.profile-page { padding-block: 40px 64px; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info h1 { font-size: 1.4rem; margin-bottom: 4px; }
.profile-info p { color: var(--color-muted); font-size: .875rem; }
.profile-since { font-size: .75rem; color: var(--color-muted); margin-top: 4px; display: block; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 28px;
  align-items: start;
}
.profile-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
}
.profile-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.profile-section-header h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary-dark);
}
.count-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Favorites button on cards */
.fav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.fav-btn:hover, .fav-btn.active { background: #FEE2E2; border-color: #FCA5A5; color: #EF4444; }
.fav-btn.loading { opacity: .5; pointer-events: none; }

@media (max-width: 1024px) {
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .profile-header { padding: 20px; }
}
