/* styles.css — Módulo Diagnósticos Nutricionales */
:root { --entity-color: #0f9d6d; }

/* ── Panel de calculados ───────────────────────────── */
.calc-results-panel, .riesgo-panel { margin: .5rem 0 1rem; }

.calc-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: .75rem; padding: 2rem; background: #f8fafc;
  border: 2px dashed #cbd5e1; border-radius: .625rem;
  color: #94a3b8; text-align: center; font-style: italic;
}
.calc-placeholder i { font-size: 2rem; }

.calc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: .75rem; margin-bottom: 1rem;
}
.calc-card {
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  padding: 1rem .75rem; background: #fff; border-radius: .625rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); text-align: center;
}
.calc-card-label { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.calc-card-value { font-size: 1.375rem; font-weight: 900; line-height: 1; }
.calc-card-sub   { font-size: .75rem; color: #94a3b8; }

/* ── Macronutrientes ───────────────────────────────── */
.macro-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
  gap: .5rem; margin-bottom: 1rem;
}
.macro-item {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .875rem .5rem; border-radius: .5rem;
  background: color-mix(in srgb, var(--c) 10%, white);
  border: 1.5px solid color-mix(in srgb, var(--c) 30%, white);
}
.macro-label { font-size: .75rem; font-weight: 700; color: var(--c); text-align: center; }
.macro-val   { font-size: 1.25rem; font-weight: 900; color: var(--c); }
.macro-sub   { font-size: .7rem; color: #94a3b8; }

/* ── Riesgo ────────────────────────────────────────── */
.riesgo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: .75rem;
}
.riesgo-card {
  background: #fff; border-radius: .5rem; padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex; flex-direction: column; gap: .25rem;
}
.riesgo-label { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; }
.riesgo-val   { font-size: 1.125rem; font-weight: 800; color: #1e293b; }

/* ── Semáforo ──────────────────────────────────────── */
.semaforo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: .75rem; margin-bottom: 1rem;
}
.semaforo-card {
  border-radius: .625rem; padding: 1rem; border: 1.5px solid;
  display: flex; flex-direction: column; gap: .5rem;
}
.semaforo-verde   { background: #f0fdf4; border-color: #86efac; }
.semaforo-amarillo{ background: #fefce8; border-color: #fde047; }
.semaforo-rojo    { background: #fef2f2; border-color: #fca5a5; }
.semaforo-icon    { font-size: 1.5rem; }
.semaforo-title   { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #475569; }
.semaforo-body    {
  font-size: .8125rem; color: #1e293b; white-space: pre-wrap;
  font-family: inherit; margin: 0; line-height: 1.6;
}

/* ── Marcadores ────────────────────────────────────── */
.marcadores-box {
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: .5rem; padding: .875rem 1rem; font-size: .875rem;
}
.marcadores-box strong { display: block; margin-bottom: .25rem; color: #0369a1; }
.marcadores-box p { color: #475569; margin: 0; }

/* ── Detalle summary ───────────────────────────────── */
.summary-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: .75rem; margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
  .calc-grid, .macro-grid, .riesgo-grid, .semaforo-grid, .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
