/* iDT — formato «campus» (estructura, no colores). Todo usa las variables y la paleta que ya tiene la app. */

/* ── Cabecera de cada sección: etiqueta pequeña + título grande ───────────── */
.vp-head h2, .sp-pagehead h2, .ag-head h2, .home-greeting-text {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.vp-head h2::before, .sp-pagehead h2::before, .ag-head h2::before, .home-greeting-text::before {
  content: "Tu programa";
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sn-muted, #5f7189);
}
.vp-head h2, .ag-head h2, .sp-pagehead h2 { text-transform: uppercase; }
.vp-head p, .sp-pagehead p, .ag-head p, .home-greeting-sub { font-size: 1.05rem; }

/* ── Tarjetas: esquinas más redondas y borde fino, como en el campus ─────── */
.content-body, .vp-card, .videos-list > *, .ag-card, .support-section .sp-card {
  border-radius: 20px;
}

/* ── Menú lateral: etiqueta, pie de usuario con «Cerrar sesión» ─────────── */
@media (min-width: 961px) {
  .side-nav-label { letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
  .side-nav-item { border-radius: 12px; padding-top: 12px; padding-bottom: 12px; }
  .side-nav-user { border-radius: 16px; }
  .cp-topbar, .cp-scrim { display: none; }
}

/* ── Aviso de instalación ──────────────────────────────────────────────── */
.cp-install {
  position: relative; display: flex; align-items: center; gap: 16px;
  margin: 0 0 18px; padding: 16px 52px 16px 18px;
  background: var(--sn-bg, #fff); color: var(--sn-text, #0f172a);
  border: 1px solid var(--sn-border, #dbe6f5); border-radius: 20px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}
.cp-install-icon { flex: none; width: 56px; height: 56px; border-radius: 14px; }
.cp-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cp-install-text strong { font-size: 1.05rem; }
.cp-install-text span { font-size: .92rem; color: var(--sn-muted, #5f7189); line-height: 1.4; }
.cp-install-btn {
  flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: #fff; padding: 12px 18px; border-radius: 12px;
  background: linear-gradient(90deg, #3F7FE0, #4FA58F); box-shadow: 0 8px 20px rgba(63, 127, 224, .25);
}
.cp-install-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer; font-size: 1rem; color: var(--sn-muted, #5f7189); padding: 6px; }
.cp-help { position: fixed; inset: 0; z-index: 9100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 14, 30, .6); backdrop-filter: blur(4px); }
.cp-help-card { position: relative; width: min(460px, 100%); padding: 26px; border-radius: 22px; background: var(--sn-bg, #fff); color: var(--sn-text, #0f172a); box-shadow: 0 30px 80px rgba(8, 12, 30, .4); }
.cp-help-card h2 { margin: 0 36px 8px 0; font-size: 1.35rem; line-height: 1.2; }
.cp-help-card > p { margin: 0 0 16px; color: var(--sn-muted, #5f7189); }
.cp-help-card ol { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 16px; }
.cp-help-card li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.45; }
.cp-help-card li > span { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3F7FE0, #4FA58F); }
.cp-help-card li svg { vertical-align: -3px; }
.cp-help-x { position: absolute; top: 14px; right: 14px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; color: var(--sn-muted, #5f7189); }
.cp-help-ok { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; color: #fff; padding: 14px; border-radius: 12px; background: linear-gradient(90deg, #3F7FE0, #4FA58F); }

/* ── Móvil: barra superior con menú ☰ y menú lateral deslizante ──────────── */
@media (max-width: 960px) {
  .cp-topbar {
    position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
    background: var(--sn-bg, #fff); color: var(--sn-text, #0f172a);
    border-bottom: 1px solid var(--sn-border, #dbe6f5);
  }
  .cp-burger { border: 0; background: none; color: inherit; padding: 6px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
  .cp-brand { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; }
  .cp-brand i { font-style: normal; color: #4FA58F; }

  .side-nav {
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 9050;
    width: min(320px, 84vw); padding: calc(env(safe-area-inset-top, 0px) + 20px) 14px 14px;
    background: var(--sn-bg, #fff); color: var(--sn-text, #0f172a);
    border-right: 1px solid var(--sn-border, #dbe6f5); box-shadow: 18px 0 50px rgba(8, 12, 30, .28);
    transform: translateX(-102%); transition: transform .26s ease; overflow-y: auto;
  }
  body.cp-nav-open .side-nav { transform: none; }
  .side-nav-collapse { display: none; }
  .side-nav-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
  .side-nav-mark { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #38bdf8, #0ea5e9 48%, #10b981); }
  .side-nav-mark svg { width: 22px; height: 22px; }
  .side-nav-brand-text { display: flex; flex-direction: column; gap: 2px; }
  .side-nav-brand-text strong { letter-spacing: .16em; }
  .side-nav-brand-text small { color: var(--sn-muted, #5f7189); }
  .side-nav-label { margin: 6px 8px 10px; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--sn-muted, #5f7189); }
  .side-nav-menu { display: flex; flex-direction: column; gap: 4px; }
  .side-nav-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; font-size: 1.02rem; text-align: left; cursor: pointer; }
  .side-nav-item svg { width: 22px; height: 22px; flex: none; }
  .side-nav-item.active { background: var(--sn-accent-soft, rgba(14,165,233,.1)); font-weight: 700; }
  .side-nav-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sn-border, #dbe6f5); }
  .side-nav-user { display: flex; align-items: center; gap: 10px; }
  .side-nav-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3F7FE0, #4FA58F); }
  .side-nav-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .side-nav-icon-btn { border: 0; background: none; color: inherit; padding: 8px; display: grid; place-items: center; }
  .cp-scrim { position: fixed; inset: 0; z-index: 9040; background: rgba(10, 14, 30, .5); opacity: 0; pointer-events: none; transition: opacity .2s ease; display: block; }
  body.cp-nav-open .cp-scrim { opacity: 1; pointer-events: auto; }
  body.cp-nav-open { overflow: hidden; }

  /* barra inferior: iconos de línea en vez de emojis */
  .bottom-nav-icon svg { width: 24px; height: 24px; display: block; margin: 0 auto; }
  .cp-install { flex-wrap: wrap; padding: 14px 44px 14px 14px; }
  .cp-install-icon { width: 48px; height: 48px; }
  .cp-install-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .side-nav, .cp-scrim { transition: none; } }

/* El botón flotante «Analizar mi plato» vive arriba a la derecha: el aviso de instalación se coloca debajo. */
@media (min-width: 961px) { .cp-install { margin-top: 52px; } }

@media (max-width: 960px) {
  .cp-install { align-items: flex-start; }
  .side-nav-user { flex-wrap: wrap; }
  .side-nav-icon-btn { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; }
  .side-nav-icon-btn svg { width: 22px; height: 22px; }
  #side-nav-logout { width: 100%; padding: 12px 10px; margin-top: 6px; color: inherit; text-decoration: none; font-size: 1rem; }
  #side-nav-logout::after { content: "Cerrar sesión"; }
}

/* ═══ Inicio más limpio ═════════════════════════════════════════════════════ */
/* «Analizar mi plato» eliminado de la vista (se oculta el botón y el flotante). */
#chat-food-scan-btn, #food-scan-fab, .home-top-controls { display: none !important; }
/* Las 4 preguntas sugeridas se quitan: el chat ya explica cómo usarlo. */
body .assistant-chat .chat-suggestion-row, body .assistant-chat.show .chat-suggestion-row { display: none !important; }

/* Contenido centrado y con aire */
body .panel-section[data-section="Inicio"] { max-width: 880px; margin-left: auto; margin-right: auto; }
body .panel-section[data-section="Inicio"] .home-greeting { margin: 4px 0 26px; }
body .panel-section[data-section="Inicio"] .home-greeting-sub { margin-top: 8px; opacity: .75; }

/* Dos accesos grandes y tranquilos */
body .panel-section[data-section="Inicio"] .home-actions-wrap { gap: 16px; margin-bottom: 26px; }
body .panel-section[data-section="Inicio"] .home-actions-wrap > button { min-height: 92px; border-radius: 22px; }
body .panel-section[data-section="Inicio"] #home-stats-btn { display: none; }

/* Aviso de instalación: una sola línea, discreto */
.cp-install { padding: 12px 46px 12px 14px; gap: 14px; margin-bottom: 22px; box-shadow: none; }
.cp-install-icon { width: 40px; height: 40px; border-radius: 10px; }
.cp-install-text strong { font-size: .98rem; }
.cp-install-text span { display: none; }
.cp-install-btn { padding: 10px 16px; font-size: .92rem; box-shadow: none; }
@media (min-width: 961px) { .cp-install { margin-top: 0; } }

/* Tarjeta de bienvenida del chat más ligera y la guía plegada */
body .assistant-chat .chat-empty-welcome-wrap { border-radius: 22px; padding: 24px 26px; box-shadow: 0 8px 30px rgba(15, 23, 42, .06); }
body .assistant-chat details.cl-tip { margin-top: 14px; }
/* Sin tarjeta dentro de otra tarjeta en el chat de bienvenida */
body .assistant-chat, body .assistant-chat .chat-empty-state { background: transparent !important; border: 0 !important; box-shadow: none !important; }
