/* ============================================================
   Nutrimetría · components.css
   Tarjetas, botones, badges y bloques del panel (Vista general)
   ============================================================ */

/* ── Tarjeta base ───────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px 24px; }

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head .ch-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--green-darker);
  font-size: 16px;
}
.card-head .ch-title { font-size: 11px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--label); }
.card-head .ch-title b {
  display: block;
  font-family: var(--font-slab);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-top: 2px;
}

/* ── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(11,75,79,.2);
  transition: background .16s, transform .1s, box-shadow .16s;
}
.btn:hover { background: var(--green-dark); box-shadow: 0 12px 26px rgba(11,75,79,.26); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }

.btn-coral { background: var(--coral); box-shadow: 0 10px 22px rgba(232,111,141,.28); }
.btn-coral:hover { background: var(--coral-dark); box-shadow: 0 12px 26px rgba(232,111,141,.34); }

.btn-outline { background: transparent; color: var(--green-dark); border: 1.5px solid var(--green); box-shadow: none; }
.btn-outline:hover { background: var(--green-light); box-shadow: none; transform: none; }

.btn-ghost { background: transparent; color: var(--text-sec); box-shadow: none; height: 44px; }
.btn-ghost:hover { background: var(--input-bg); box-shadow: none; transform: none; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500; border: 1px solid transparent;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #BFE3C2; }
.badge.neutral { background: var(--input-bg); color: var(--text-sec); border-color: var(--border); }
.badge.primary { background: var(--green-light); color: var(--green-darker); border-color: var(--green-container); }

/* ============================================================
   Vista general (dashboard del panel)
   ============================================================ */

.hero-head { margin-bottom: 26px; }
.hero-head h1 { font-family: var(--font-slab); font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.hero-head p { font-size: 14.5px; color: var(--text-sec); max-width: 620px; line-height: 1.6; }

/* Fila de estadísticas */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-card.accent { background: var(--cream-soft); border-color: var(--cream-line); }
.stat-card .sc-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--label); margin-bottom: 10px;
}
.stat-card .sc-value { font-family: var(--font-slab); font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-card .sc-hint { font-size: 12px; color: var(--text-sec); margin-top: 6px; }

/* Grilla principal: accesos rápidos + metodologías */
.panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--label); margin-bottom: 14px;
}

.quick-list { display: flex; flex-direction: column; gap: 10px; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.quick-item:hover { border-color: var(--green-container); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-item .qi-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700; color: var(--green-dark);
  background: var(--green-light);
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quick-item .qi-body { flex: 1; min-width: 0; }
.quick-item .qi-title { font-size: 14px; font-weight: 600; color: var(--text); }
.quick-item .qi-sub { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.quick-item .qi-arrow { color: var(--label); font-size: 14px; flex-shrink: 0; }

/* Caja oscura "Metodologías validadas" */
.dark-box {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 22px;
}
.dark-box .section-label { color: rgba(255,255,255,.55); }
.tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
}

.howto-list { display: flex; flex-direction: column; gap: 14px; }
.howto-step { display: flex; gap: 13px; align-items: flex-start; }
.howto-step .hs-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-light); color: var(--green-darker);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.howto-step .hs-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.howto-step .hs-text { font-size: 12.5px; color: var(--text-sec); margin-top: 2px; line-height: 1.5; }

/* Estado vacío (categoría sin herramientas / iframe) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  height: 100%;
  min-height: 420px;
  padding: 40px;
  color: var(--text-sec);
}
.empty-state .es-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-light); color: var(--green-darker);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.empty-state h2 { font-family: var(--font-slab); font-size: 18px; color: var(--text); }
.empty-state p { font-size: 13.5px; max-width: 340px; line-height: 1.55; }

@media (max-width: 1080px) {
  .panel-grid { grid-template-columns: 1fr; }
}
