/* ─────────────────────────────────────────────
   HISTORY — Historial de cocinado
   ───────────────────────────────────────────── */

.history {
  background: var(--color-surface);
  padding-bottom: 32px;
}

/* ── Header ───────────────────────────────────── */
.history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 52px var(--screen-padding) 16px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.history__back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
}

.history__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ── Stats strip ──────────────────────────────── */
.history__stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px var(--screen-padding);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
}

.history__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.history__stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-brand-primary);
  line-height: 1;
}

.history__stat-label {
  font-size: 12px;
  color: var(--color-text-subtle);
}

.history__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border-subtle);
  flex-shrink: 0;
}

/* ── Day label ────────────────────────────────── */
.history__day-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-subtle);
  padding: 20px var(--screen-padding) 8px;
}

/* ── Lista ────────────────────────────────────── */
.history__list {
  display: flex;
  flex-direction: column;
}

/* ── Card ─────────────────────────────────────── */
.history__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--screen-padding);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}
.history__card:active {
  background: var(--color-bg-surface);
}

.history__card-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  position: relative;
}

.history__card-ai-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 1px 5px;
  border-radius: 4px;
}

.history__card-body {
  flex: 1;
  min-width: 0;
}

.history__card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history__card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-subtle);
  margin-bottom: 6px;
}

.history__card-stars {
  display: flex;
  gap: 2px;
  align-items: center;
}

.history__card-unrated {
  font-size: 12px;
  color: var(--color-text-subtle);
  font-style: italic;
}

.history__card-when {
  font-size: 11px;
  color: var(--color-text-subtle);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

/* ── Empty ────────────────────────────────────── */
.history__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 32px;
  gap: 10px;
}

.history__empty-icon {
  margin-bottom: 8px;
  opacity: 0.45;
}

.history__empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.history__empty-sub {
  font-size: 14px;
  color: var(--color-text-subtle);
  line-height: 1.55;
  max-width: 280px;
}

.history__empty-btn {
  margin-top: 8px;
  background: var(--color-brand-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
