/* ============================================================
   DR. VERDE — COMPONENTES ADICIONALES
   ============================================================ */

/* ===== LOGROS EN DASHBOARD ===== */
.logro-card {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: 6px;
  transition: all 0.2s;
  cursor: default;
}
.logro-card.unlocked {
  border-color: var(--green);
  background: rgba(184,187,38,0.05);
}
.logro-card.locked { opacity: 0.4; }
.logro-emoji { font-size: 1.5rem; display: block; margin-bottom: 5px; }
.logro-name  { font-size: 0.72rem; color: var(--fg4); }
.logro-card.unlocked .logro-name { color: var(--green); }

/* ===== TIMER ===== */
.timer-display {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--green);
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  margin: 20px 0;
}
.timer-display.warning { color: var(--yellow); }
.timer-display.danger  { color: var(--red);    animation: pulseGreen 0.5s infinite; }

/* ===== WATER TRACKER ===== */
.water-cup {
  font-size: 2rem;
  cursor: pointer;
  filter: grayscale(100%);
  opacity: 0.25;
  transition: all 0.2s;
  user-select: none;
}
.water-cup.filled {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}
.water-cup:hover { opacity: 0.7; transform: scale(1.05); }

/* ===== SEARCH ===== */
.search-wrapper {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg4);
  pointer-events: none;
}
.search-wrapper .input-field {
  padding-left: 38px;
}

/* ===== FLIP CARDS (Mitos) ===== */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 180px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flip-card-front {
  background: var(--bg);
  border: 1px solid var(--red);
}
.flip-card-back {
  background: rgba(184,187,38,0.05);
  border: 1px solid var(--green);
  transform: rotateY(180deg);
}
.flip-label {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ===== ENCYCLOPEDIA CARD ===== */
.parasite-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}
.parasite-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.parasite-card-header {
  background: var(--bg1);
  padding: 15px;
  border-bottom: 1px solid var(--bg2);
}
.parasite-emoji { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.parasite-name  { color: var(--green); font-weight: 700; }
.parasite-sci   { color: var(--fg4); font-size: 0.75rem; font-style: italic; }
.parasite-card-body { padding: 15px; font-size: 0.82rem; color: var(--fg3); }

/* ===== COURSE CARD ===== */
.course-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.course-card:hover { border-color: var(--green); }
.course-progress {
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  margin: 12px 0 8px;
  overflow: hidden;
}
.course-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.5s;
}

/* ===== COMMUNITY ===== */
.post-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 18px;
  margin: 10px 0;
  transition: all 0.2s;
}
.post-card:hover { border-color: var(--bg3); }
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-avatar {
  width: 32px; height: 32px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.post-author { color: var(--green); font-size: 0.85rem; font-weight: 700; }
.post-date   { color: var(--fg4); font-size: 0.75rem; }
.post-content { color: var(--fg3); font-size: 0.87rem; line-height: 1.6; }
.post-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--bg1);
}
.post-action-btn {
  background: none;
  border: none;
  color: var(--fg4);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-action-btn:hover { background: var(--bg1); color: var(--green); }

/* ===== GARDEN ===== */
.plant-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}
.plant-card:hover {
  border-color: var(--aqua);
  transform: translateY(-2px);
}
.plant-emoji { font-size: 3rem; display: block; margin-bottom: 10px; }
.plant-name  { color: var(--aqua); font-weight: 700; margin-bottom: 5px; }
.difficulty-stars { color: var(--yellow); font-size: 0.85rem; }

/* ===== PET CARD ===== */
.pet-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}
.pet-card:hover { border-color: var(--orange); }

/* ===== BEFORE/AFTER ===== */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ba-column {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 20px;
}
.ba-column.before { border-color: var(--red); }
.ba-column.after  { border-color: var(--green); }
.ba-title {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 0.9rem;
}
.ba-column.before .ba-title { color: var(--red); }
.ba-column.after  .ba-title { color: var(--green); }

/* ===== RADAR CHART WRAPPER ===== */
.radar-wrapper {
  position: relative;
  height: 300px;
  max-width: 400px;
  margin: 0 auto;
}

/* ===== BLOG CARD ===== */
.blog-card {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 20px;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 15px;
}
.blog-card:hover { border-color: var(--blue); }
.blog-card-icon { font-size: 2rem; flex-shrink: 0; }
.blog-title { color: var(--fg); font-weight: 700; font-size: 0.95rem; margin-bottom: 5px; }
.blog-excerpt { color: var(--fg4); font-size: 0.82rem; line-height: 1.5; }
.blog-meta { display: flex; gap: 10px; margin-top: 8px; }

/* ===== COMPARATOR ===== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.compare-col {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  overflow: hidden;
}
.compare-col.natural    { border-top: 3px solid var(--green); }
.compare-col.farmacolog { border-top: 3px solid var(--blue);  }
.compare-header {
  padding: 12px 15px;
  background: var(--bg1);
  font-weight: 700;
  font-size: 0.9rem;
}
.compare-col.natural    .compare-header { color: var(--green); }
.compare-col.farmacolog .compare-header { color: var(--blue);  }
.compare-body { padding: 15px; }
.compare-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--bg1);
  font-size: 0.83rem;
}
.compare-row:last-child { border-bottom: none; }
.compare-label { color: var(--fg4); }
.compare-value { color: var(--fg); font-weight: 600; }

/* ===== LAB ===== */
.lab-result {
  background: var(--bg-soft);
  border: 1px solid var(--bg2);
  border-radius: 6px;
  padding: 15px;
  margin: 10px 0;
  font-size: 0.85rem;
}
.lab-result.positive { border-color: var(--red); }
.lab-result.negative { border-color: var(--green); }

/* ===== WELLNESS ===== */
.breath-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 700;
  transition: transform 4s ease-in-out;
}
.breath-circle.inhale  { transform: scale(1.3); background: rgba(184,187,38,0.1); }
.breath-circle.exhale  { transform: scale(0.8); background: transparent; }
.breath-circle.hold    { transform: scale(1.3); background: rgba(184,187,38,0.05); }

/* ===== LOADING STYLES ===== */
.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--fg4);
  gap: 10px;
  font-size: 0.9rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 50px 20px;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 15px; display: block; }
.empty-state-title { color: var(--fg); font-weight: 700; margin-bottom: 8px; }
.empty-state-desc  { color: var(--fg4); font-size: 0.85rem; margin-bottom: 20px; }

/* ===== DIAGNOSIS ===== */
.quiz-question {
  background: var(--bg);
  border: 1px solid var(--bg2);
  border-radius: 8px;
  padding: 25px;
  margin: 15px 0;
}
.quiz-question-text {
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quiz-option {
  padding: 10px 15px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: 4px;
  color: var(--fg3);
  font-family: var(--font);
  font-size: 0.87rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.quiz-option:hover { border-color: var(--green); color: var(--fg); }
.quiz-option.selected {
  background: rgba(184,187,38,0.1);
  border-color: var(--green);
  color: var(--green);
}
.quiz-progress-text {
  color: var(--fg4);
  font-size: 0.8rem;
  text-align: right;
  margin-bottom: 5px;
}

/* ===== RESPONSIVE EXTRA ===== */
@media (max-width: 600px) {
  .ba-grid        { grid-template-columns: 1fr; }
  .compare-grid   { grid-template-columns: 1fr; }
  .timer-display  { font-size: 2.5rem; }
  .flip-card-inner{ height: 220px; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar, .topbar, .chat-fab,
  .chat-float-window, .toast-container,
  .scroll-top, .sidebar-overlay,
  .btn, button { display: none !important; }

  .app    { grid-template-columns: 1fr; }
  .card   { border: 1px solid #ccc; break-inside: avoid; }
  body    { background: white !important; color: black !important; }
  .text-green { color: #2e7d32 !important; }
  .section-title::before { content: '##'; }
}