
/* ==========================================================================
   Aesthetic polish — cards, hero, nav, interactions
   ========================================================================== */

/* Today hero */
.plan-today-hero--gradient {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
  margin-bottom: 16px;
  border-radius: var(--plan-radius);
  background: var(--plan-gradient-primary);
  color: white;
  box-shadow: var(--plan-shadow-lg);
}

.plan-today-hero__glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(40px);
  pointer-events: none;
}

.plan-today-hero--gradient .plan-section__eyebrow {
  color: rgba(255, 255, 255, 0.75);
  position: relative;
}

.plan-today-hero--gradient .plan-section__title {
  color: white;
  font-size: 1.65rem;
  position: relative;
}

.plan-today-hero--gradient .plan-today-focus {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
}

.plan-today-focus__badge {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.plan-today-hero--gradient .plan-today-focus__badge.is-swim {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.plan-today-hero--gradient .plan-today-focus__badge.is-gym {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Progress status banner */
.plan-progress-status {
  background: var(--plan-surface);
  border-radius: var(--plan-radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--plan-border);
  box-shadow: var(--plan-shadow-sm);
}

.plan-progress-status__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.plan-progress-status__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  border-radius: var(--plan-radius-sm);
  background: var(--plan-surface-alt);
  transition: transform 0.2s var(--plan-ease);
}

.plan-progress-status__item--primary {
  background: var(--plan-primary-light);
  border: 1px solid rgba(10, 107, 94, 0.15);
}

.plan-progress-status__icon {
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1;
}

.plan-progress-status__val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--plan-primary-dark);
  line-height: 1.1;
}

.plan-progress-status__lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--plan-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-progress-status__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.plan-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--plan-surface-alt);
  color: var(--plan-text-muted);
  border: 1px solid var(--plan-border);
}

.plan-chip--accent {
  background: var(--plan-accent-light);
  color: #9a5a10;
  border-color: rgba(232, 146, 58, 0.25);
}

/* Today content blocks */
.plan-today-block {
  background: var(--plan-surface);
  border-radius: var(--plan-radius);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--plan-border);
  box-shadow: var(--plan-shadow-sm);
}

.plan-today-block__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.plan-today-block__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.plan-today-block__icon--workout {
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.2);
}

.plan-today-block__icon--diet {
  background: linear-gradient(135deg, #fef3e8, #fdebd0);
  box-shadow: 0 4px 12px rgba(232, 146, 58, 0.2);
}

.plan-today-block__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Meal cards */
.plan-today-meal {
  background: var(--plan-surface-alt);
  border-radius: var(--plan-radius-sm);
  padding: 14px;
  border: 1px solid var(--plan-border);
  transition: transform 0.2s var(--plan-ease), box-shadow 0.2s var(--plan-ease);
}

.plan-today-meal:hover {
  transform: translateY(-1px);
  box-shadow: var(--plan-shadow-sm);
}

.plan-today-meal--0 { border-left: 3px solid #f4a261; }
.plan-today-meal--1 { border-left: 3px solid #0a6b5e; }
.plan-today-meal--2 { border-left: 3px solid #0891b2; }
.plan-today-meal--3 { border-left: 3px solid #1a7a45; }
.plan-today-meal--4 { border-left: 3px solid #9b59b6; }
.plan-today-meal--5 { border-left: 3px solid #5c726b; }

.plan-meal__time {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--plan-primary);
}

/* Recipe accordion */
.plan-recipe {
  margin-top: 12px;
  border-top: 1px dashed var(--plan-border-strong);
  padding-top: 10px;
}

.plan-recipe__summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--plan-primary);
  list-style: none;
  padding: 8px 12px;
  border-radius: var(--plan-radius-xs);
  background: var(--plan-primary-light);
  transition: background 0.2s;
}

.plan-recipe__summary:hover {
  background: rgba(10, 107, 94, 0.15);
}

.plan-recipe[open] .plan-recipe__summary {
  border-radius: var(--plan-radius-xs) var(--plan-radius-xs) 0 0;
  margin-bottom: 0;
}

.plan-recipe__body {
  margin-top: 0;
  padding: 12px;
  background: var(--plan-surface);
  border-radius: 0 0 var(--plan-radius-xs) var(--plan-radius-xs);
  border: 1px solid var(--plan-border);
  border-top: none;
  animation: plan-slide-down 0.25s var(--plan-ease);
}

@keyframes plan-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Checklist card groups */
.plan-checklist-group--card {
  background: var(--plan-surface);
  border-radius: var(--plan-radius);
  padding: 16px 16px 8px;
  margin-bottom: 12px;
  border: 1px solid var(--plan-border);
  box-shadow: var(--plan-shadow-sm);
}

.plan-checklist-group--morning { border-top: 3px solid #f4a261; }
.plan-checklist-group--workout { border-top: 3px solid var(--plan-swim); }
.plan-checklist-group--meals { border-top: 3px solid var(--plan-accent); }
.plan-checklist-group--targets { border-top: 3px solid var(--plan-success); }
.plan-checklist-group--supplements { border-top: 3px solid #7b68ee; }

.plan-checklist-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.plan-checklist-group__emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--plan-surface-alt);
  font-size: 1rem;
}

.plan-checklist--touch .plan-checklist__item {
  border-bottom: 1px solid var(--plan-border);
  border-radius: var(--plan-radius-xs);
  margin-bottom: 4px;
  transition: background 0.15s;
}

.plan-checklist--touch .plan-checklist__item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.plan-checklist--touch .plan-checklist__item:active {
  background: var(--plan-surface-alt);
}

.plan-checklist--touch .plan-checklist__item label::before {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 2px solid var(--plan-border-strong);
  transition: all 0.25s var(--plan-ease);
}

.plan-checklist--touch .plan-checklist__item.is-done label::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #0a6b5e 0%, #0d9488 50%, #0891b2 100%);
  background-size: 18px 18px, 100% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--plan-primary-glow);
}

.plan-checklist--touch .plan-checklist__item.is-done {
  background: rgba(10, 107, 94, 0.04);
  border-radius: var(--plan-radius-xs);
}

/* Stats & badges */
.plan-stat {
  background: var(--plan-surface);
  border: 1px solid var(--plan-border);
  border-radius: var(--plan-radius-sm);
  padding: 18px 14px;
  box-shadow: var(--plan-shadow-sm);
  transition: transform 0.2s var(--plan-ease);
}

.plan-stat:hover {
  transform: translateY(-2px);
}

.plan-stat__value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--plan-gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.plan-badge {
  box-shadow: var(--plan-shadow-sm);
  font-weight: 700;
}

.plan-badge--primary {
  background: var(--plan-primary-light);
  border: 1px solid rgba(10, 107, 94, 0.12);
}

.plan-badge--accent {
  background: var(--plan-accent-light);
  border: 1px solid rgba(232, 146, 58, 0.2);
}

/* Buttons & inputs */
.plan-btn--primary {
  background: var(--plan-gradient-primary);
  color: white;
  box-shadow: 0 4px 14px var(--plan-primary-glow);
  transition: transform 0.15s, box-shadow 0.2s;
}

.plan-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--plan-primary-glow);
}

.plan-btn--primary:active {
  transform: translateY(0);
}

.plan-input {
  border: 1.5px solid var(--plan-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-input:focus {
  outline: none;
  border-color: var(--plan-primary);
  box-shadow: 0 0 0 3px var(--plan-primary-glow);
}

.plan-weight-form--card {
  background: var(--plan-surface);
  border-radius: var(--plan-radius);
  padding: 18px;
  border: 1px solid var(--plan-border);
  box-shadow: var(--plan-shadow-sm);
}

/* Exercise & diet planner polish */
.plan-exercise-tag {
  background: var(--plan-surface-alt);
  border: 1px solid var(--plan-border);
  font-weight: 600;
}

.plan-diet-total {
  background: var(--plan-surface);
  border: 1px solid var(--plan-border);
  border-radius: var(--plan-radius-sm);
  box-shadow: var(--plan-shadow-sm);
}

.plan-diet-total__val {
  font-weight: 800;
  color: var(--plan-primary-dark);
}

.plan-day-btn.is-active {
  background: var(--plan-gradient-primary);
  box-shadow: 0 4px 12px var(--plan-primary-glow);
}

.plan-phase-tab.is-active {
  background: var(--plan-gradient-primary);
  box-shadow: 0 4px 12px var(--plan-primary-glow);
}

.plan-chart-card {
  background: var(--plan-surface);
  border-radius: var(--plan-radius);
  box-shadow: var(--plan-shadow-sm);
}

.plan-priority-card {
  box-shadow: var(--plan-shadow-sm);
  transition: transform 0.2s var(--plan-ease);
}

.plan-priority-card:hover {
  transform: translateY(-2px);
}

.plan-nav__link {
  font-weight: 500;
  transition: all 0.2s var(--plan-ease);
}

.plan-nav__link.is-active {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--plan-primary);
}

/* Sheet */
.plan-sheet__panel {
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.12);
}

.plan-sheet__close {
  transition: background 0.2s, transform 0.15s;
}

.plan-sheet__close:hover {
  background: var(--plan-primary-light);
  transform: rotate(90deg);
}

@media (max-width: 380px) {
  .plan-today-hero--gradient .plan-section__title {
    font-size: 1.4rem;
  }
}

@media (min-width: 480px) {
  .plan-progress-status__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .plan-today-hero--gradient {
    padding: 28px 28px;
  }

  .plan-today-hero--gradient .plan-section__title {
    font-size: 2rem;
  }

  .plan-progress-status__val {
    font-size: 1.5rem;
  }
}

.plan-checklist-group__hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--plan-text-muted);
  padding: 8px 12px;
  background: var(--plan-surface-alt);
  border-radius: var(--plan-radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  .plan-progress-bar__fill {
    animation: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Date navigation & tracking */
.plan-date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.plan-date-nav__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--plan-border);
  border-radius: var(--plan-radius-sm);
  background: var(--plan-surface);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--plan-ease);
}

.plan-date-nav__btn:hover:not(:disabled) {
  border-color: var(--plan-primary);
  color: var(--plan-primary);
}

.plan-date-nav__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.plan-date-nav__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.plan-date-nav__today {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.85rem;
}

.plan-date-nav__badge {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: var(--plan-radius-xs);
  background: var(--plan-accent-light);
  color: #9a5a10;
  font-size: 0.78rem;
  font-weight: 600;
}

.plan-period-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .plan-period-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.plan-period-card,
.plan-history-card {
  background: var(--plan-surface);
  border: 1px solid var(--plan-border);
  border-radius: var(--plan-radius);
  padding: 16px;
  box-shadow: var(--plan-shadow-sm);
}

.plan-period-card__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
}

.plan-period-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 480px) {
  .plan-period-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.plan-period-stat {
  text-align: center;
  padding: 10px 6px;
  background: var(--plan-surface-alt);
  border-radius: var(--plan-radius-sm);
}

.plan-period-stat__val {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--plan-primary-dark);
  letter-spacing: -0.02em;
}

.plan-period-stat__lbl {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--plan-text-muted);
  margin-top: 2px;
}

.plan-period-details {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--plan-text-muted);
  line-height: 1.5;
}

.plan-period-details li {
  margin-bottom: 4px;
}

.plan-period-empty,
.plan-history-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--plan-text-muted);
  list-style: none;
}

.plan-history-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

@media (min-width: 480px) {
  .plan-history-card__head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

.plan-history-card__hint {
  font-size: 0.75rem;
  color: var(--plan-text-muted);
}

.plan-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
}

.plan-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--plan-radius-sm);
  border: 1px solid var(--plan-border);
  background: var(--plan-surface-alt);
  cursor: pointer;
  transition: all 0.15s var(--plan-ease);
}

.plan-history-item:hover {
  border-color: var(--plan-primary);
  background: var(--plan-primary-light);
}

.plan-history-item.is-active {
  border-color: var(--plan-primary);
  box-shadow: 0 0 0 2px var(--plan-primary-glow);
}

.plan-history-item.is-today {
  border-left: 3px solid var(--plan-accent);
}

.plan-history-item.is-empty {
  opacity: 0.65;
}

.plan-history-item__type {
  grid-row: span 2;
  font-size: 1rem;
}

.plan-history-item__date {
  font-size: 0.85rem;
  font-weight: 700;
}

.plan-history-item__bar {
  grid-column: 2;
  height: 6px;
  background: rgba(10, 107, 94, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.plan-history-item__fill {
  height: 100%;
  background: var(--plan-gradient-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.plan-history-item__pct {
  grid-column: 3;
  grid-row: span 2;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--plan-primary-dark);
  white-space: nowrap;
}

.plan-history-item__weight {
  grid-column: 2;
  font-size: 0.72rem;
  color: var(--plan-text-muted);
}

