/* ===========================================================
   guia.css — "Hoy" (camino guiado), planificador IA,
   patrones/revisión mensual y nota de historial.
   Usa los tokens de styles.css.
   =========================================================== */

/* ---------------- layout general ---------------- */
.gu-wrap { max-width: 680px; margin: 0 auto; }
.gu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gu-title { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.gu-frase { color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; }
.gu-panel-link {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  font-size: 12.5px; font-weight: 600; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  transition: color .15s ease, border-color .15s ease;
}
.gu-panel-link:hover { color: var(--ink); border-color: var(--ink-ghost); }

/* ---------------- progreso ---------------- */
.gu-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.gu-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.gu-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--terracotta), var(--ochre)); transition: width .5s cubic-bezier(.3,.8,.4,1); }
.gu-progress-txt { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }

/* ---------------- el camino ---------------- */
.gu-path { display: flex; flex-direction: column; }
.gu-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.gu-rail { display: flex; flex-direction: column; align-items: center; }
.gu-node {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--line);
  color: var(--ink-faint);
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.gu-step.done .gu-node { background: var(--sage); border-color: var(--sage); color: white; }
.gu-step.current .gu-node { border-color: var(--terracotta); color: var(--terracotta); box-shadow: 0 0 0 4px var(--terracotta-soft); }
.gu-node-final { background: var(--ochre-soft); border-color: var(--ochre); color: oklch(0.55 0.12 80); }
.gu-line { width: 1.5px; flex: 1; min-height: 14px; background: var(--line); margin: 4px 0; }
.gu-step:last-child .gu-line { display: none; }
.gu-body { padding-bottom: 18px; min-width: 0; }

/* fila colapsada (hecho / pendiente) */
.gu-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 2px; min-width: 0; }
.gu-row-title { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.gu-step.next .gu-row-title { color: var(--ink-faint); font-weight: 500; }
.gu-row-status { font-size: 12.5px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gu-step.done .gu-row-title { color: var(--ink-soft); }

/* tarjeta del paso actual */
.gu-card { padding: 22px 22px 20px; }
.gu-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.gu-card-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.gu-skip { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.gu-skip:hover { color: var(--ink-soft); text-decoration: underline; }
.gu-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin: 4px 0 16px; text-wrap: pretty; }

/* check-in: escalas */
.gu-scales { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gu-scale-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.gu-scale-dots { display: flex; gap: 7px; }
.gu-dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--paper);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.gu-dot:hover { transform: translateY(-2px); border-color: var(--ink-ghost); }
.gu-dot.on { color: white; transform: scale(1.06); }
.gu-scale-name { font-size: 12px; color: var(--ink-faint); margin-top: 7px; min-height: 16px; }
@media (max-width: 560px) { .gu-scales { grid-template-columns: 1fr; } .gu-dot { width: 42px; height: 42px; } }

/* intención */
.gu-intent { display: flex; gap: 10px; }
.gu-intent .mini-input { flex: 1; }

/* tareas y hábitos */
.gu-tasks { display: flex; flex-direction: column; gap: 8px; }
.gu-task {
  display: flex; align-items: center; gap: 13px; width: 100%;
  text-align: left; padding: 12px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--paper-2, var(--cream));
  transition: border-color .15s ease, background .15s ease;
}
button.gu-task:hover { border-color: var(--ink-ghost); }
.gu-task.done { opacity: 0.62; }
.gu-task.done .gu-task-name { text-decoration: line-through; }
.gu-task-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 1.7px solid var(--line); background: var(--paper);
  display: grid; place-items: center;
  transition: background .15s ease, border-color .15s ease;
}
.gu-task.done .gu-task-check { background: var(--sage); border-color: var(--sage); }
.gu-task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gu-task-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.gu-task-meta { font-size: 12px; color: var(--ink-faint); }
.gu-habit { cursor: default; }
.gu-habit .gu-task-check { cursor: pointer; }
.gu-plus {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  color: var(--terracotta); flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.gu-plus:hover { background: var(--terracotta-soft); border-color: var(--terracotta); }
.gu-streak { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); flex-shrink: 0; }
.gu-streak svg { color: var(--terracotta); }

/* gratitud */
.gu-grats { display: flex; flex-direction: column; gap: 10px; }
.gu-grat-row { display: flex; align-items: center; gap: 12px; }
.gu-grat-row .mini-input { flex: 1; }
.gu-grat-n {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--alma-soft, var(--cream-2)); color: var(--cat-alma, var(--ink-soft));
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px;
}

/* cierre del día */
.gu-final { background: linear-gradient(160deg, var(--ochre-soft), var(--paper) 70%); }
.gu-final-title { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; margin-bottom: 4px; }
.gu-memory { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; }
.gu-memory-eb { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 7px; }
.gu-memory-text { font-size: 14px; color: var(--ink-soft); line-height: 1.5; font-style: italic; }
.gu-final-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* accesos suaves + pista */
.gu-quick { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gu-quick-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.gu-quick-btn:hover { color: var(--ink); border-color: var(--ink-ghost); transform: translateY(-1px); }
.gu-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-faint); margin-top: 16px; }
.gu-hint svg { color: var(--terracotta); }

/* ---------------- nota de historial (plan Gratis) ---------------- */
.hist-limit {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.45;
  background: var(--cream-2); border-radius: var(--r-sm, 10px);
  padding: 9px 13px; margin: 0 0 14px;
}
.hist-limit svg { color: var(--ink-faint); flex-shrink: 0; }
.hist-limit b { color: var(--ink); }
.hist-limit .card-link { flex-shrink: 0; white-space: nowrap; }

/* ---------------- tarjetas IA (patrones / revisión) ---------------- */
.ia-busy { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-faint); padding: 14px 0 6px; }
.ia-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta); animation: iaPulse 1.1s ease-in-out infinite; }
@keyframes iaPulse { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }

.ia-patterns { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.ia-pattern { display: flex; gap: 13px; align-items: flex-start; }
.ia-pat-ico {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--terracotta-soft); color: var(--terracotta);
}
.ia-pat-title { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.ia-pat-detail { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.ia-at { font-family: var(--mono); font-size: 11px; color: var(--ink-ghost); margin-top: 2px; }

.ia-review { margin-top: 14px; }
.ia-rev-resumen { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin-bottom: 16px; text-wrap: pretty; }
.ia-rev-block { margin-bottom: 14px; }
.ia-rev-eb { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.ia-rev-eb.ok { color: var(--sage); }
.ia-rev-eb.warn { color: oklch(0.55 0.12 80); }
.ia-rev-item { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; padding: 3px 0; }
.ia-rev-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; position: relative; top: -2px; }
.ia-rev-dot.ok { background: var(--sage); }
.ia-rev-dot.warn { background: var(--ochre); }
.ia-rev-next {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--terracotta-soft); border-radius: var(--r-sm, 10px);
  padding: 12px 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink);
}
.ia-rev-next svg { color: var(--terracotta); flex-shrink: 0; margin-top: 2px; }

/* ---------------- planificador de metas (modal) ---------------- */
.gp-objectives { display: flex; flex-direction: column; gap: 14px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.gp-obj { background: var(--cream-2); border-radius: var(--r-md); padding: 14px 16px; }
.gp-obj-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.gp-item { display: flex; align-items: baseline; gap: 9px; padding: 4px 0; font-size: 13px; color: var(--ink-soft); }
.gp-item-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--terracotta); flex-shrink: 0; position: relative; top: -2px; }
.gp-item-name { flex: 1; line-height: 1.4; }
.gp-item-date { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.gp-foot-note { font-size: 12px; color: var(--ink-faint); margin: 12px 0 14px; }
