/* ─────────────────────────────────────────────
   AI HUB — styles
   Prefix: ah__
   ───────────────────────────────────────────── */

/* ── Base shell ───────────────────────────────── */
.ah {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--color-bg-base);
  font-family: var(--font-body);
}

/* ── Scrollable body ──────────────────────────── */
.ah__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 0;
  -webkit-overflow-scrolling: touch;
}

/* ══════════════════════════════════════════════
   HEADER — home
   ══════════════════════════════════════════════ */
.ah__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 52px 20px 20px;
  background: var(--color-bg-surface);
  border-bottom: 1px solid #f0ece4;
}

.ah__header-tag {
  font-size: 12px;
  color: var(--color-text-subtle);
  margin-bottom: 3px;
}

.ah__header-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.ah__header-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg,#d4a830,#b8860b);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(212,168,48,.3);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   SUB-SCREEN HEADER
   ══════════════════════════════════════════════ */
.ah__sub-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 52px 20px 16px;
  background: var(--color-bg-surface);
  border-bottom: 1px solid #f0ece4;
}

.ah__back {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-bg-muted);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-text-primary);
}

.ah__sub-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 2px;
}

.ah__sub-desc {
  font-size: 13px;
  color: var(--color-text-subtle);
  margin-top: 3px;
}

/* ══════════════════════════════════════════════
   FOR YOU CARD (golden)
   ══════════════════════════════════════════════ */
.ah__for-you {
  background: var(--color-ai-golden-soft);
  border: 1.5px solid #e6d472;
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 20px;
}

.ah__for-you-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-ai-golden-dark);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.ah__for-you-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.ah__for-you-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 18px;
}

.ah__for-you-btns {
  display: flex;
  gap: 8px;
}

.ah__for-you-btn {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

.ah__for-you-btn--solid {
  background: #b8860b;
  color: #fff;
  border: none;
}

.ah__for-you-btn--outline {
  background: transparent;
  color: var(--color-ai-golden-dark);
  border: 2px solid #e6d472;
}

/* ══════════════════════════════════════════════
   QUICK ACTIONS
   ══════════════════════════════════════════════ */
.ah__section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.ah__quick-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ah__quick-row::-webkit-scrollbar { display: none; }

.ah__quick-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--color-bg-surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-text-primary);
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   RECOMMENDATION CARDS
   ══════════════════════════════════════════════ */
.ah__rec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ah__rec-card {
  background: var(--color-bg-surface);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.ah__rec-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: 5px;
}

.ah__rec-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.ah__rec-action {
  margin-top: 12px;
  width: 100%;
  padding: 11px;
  border-radius: 11px;
  border: none;
  background: var(--color-bg-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-brand-primary);
  cursor: pointer;
}

/* ══════════════════════════════════════════════
   NAV CARDS (Mi perfil / Explicaciones)
   ══════════════════════════════════════════════ */
.ah__nav-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ah__nav-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-bg-surface);
  border-radius: 16px;
  padding: 16px;
  border: none;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.ah__nav-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ah__nav-card-text { flex: 1; }

.ah__nav-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.ah__nav-card-sub {
  font-size: 12px;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════
   LEARNING — Mi perfil
   ══════════════════════════════════════════════ */
.ah__stats-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,#2a4030,#3d5a40);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
}

.ah__stats-bubble {
  position: absolute;
  top: -28px; right: -28px;
  width: 140px; height: 140px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}

.ah__stats-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 16px;
}

.ah__stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ah__stats-val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.ah__stats-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  margin-top: 5px;
}

/* Shared card */
.ah__card {
  background: var(--color-bg-surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 16px;
}

.ah__card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Chef IA observation */
.ah__observation {
  background: var(--color-ai-golden-soft);
  border: 1.5px solid #e6d472;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}

.ah__obs-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg,#d4a830,#b8860b);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ah__obs-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ai-golden-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ah__obs-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.ah__obs-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ══════════════════════════════════════════════
   EXPLAIN
   ══════════════════════════════════════════════ */
.ah__explain-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ah__card--explain {
  margin-bottom: 0;
}

.ah__topic-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
}

.ah__topic-q {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-top: 6px;
}

.ah__topic-exp {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.ah__topic-tip {
  background: var(--color-bg-muted);
  border-radius: 12px;
  padding: 12px;
}

/* ══════════════════════════════════════════════
   REPLACEMENT
   ══════════════════════════════════════════════ */
.ah__sub-card {
  background: var(--color-bg-surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
  margin-bottom: 16px;
}

.ah__comparator {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.ah__comp-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah__comp-label {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ah__comp-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.ah__comp-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  flex-shrink: 0;
}

.ah__compat {
  margin-bottom: 16px;
}

.ah__cooking-adjust {
  background: var(--color-bg-muted);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.ah__adjust-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b6157;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}

.ah__adjust-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.ah__pro-tip {
  background: var(--color-ai-golden-soft);
  border-left: 3px solid #d4a830;
  padding: 14px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
}

.ah__pro-tip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ai-golden-dark);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}

.ah__pro-tip-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.ah__apply-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: var(--color-brand-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(61,90,64,.25);
}

.ah__alt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ah__alt-card {
  background: var(--color-bg-surface);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.ah__alt-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand-primary);
  background: var(--color-brand-primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
