/* ====================================================
   SCREENS & VIEWS STYLING (TODAY, WEEK, PROGRESS, PLAN)
   ==================================================== */

/* ----------------------------------------------------
   1. TODAY SCREEN (HERO & CHECKLISTS)
   ---------------------------------------------------- */
.hero-mission-card {
  background: linear-gradient(145deg, var(--bg-card), rgba(255, 107, 0, 0.05));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.hero-mission-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-date-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--orange-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-session-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-white);
  line-height: 1.15;
}

.hero-session-focus {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

/* Circular SVG Progress Ring */
.progress-ring-wrap {
  position: relative;
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
  width: 82px;
  height: 82px;
}

.ring-track {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 7;
}

.ring-fill {
  fill: none;
  stroke: var(--orange-500);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 219.9;
  stroke-dashoffset: 219.9;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.ring-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-center-number {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  font-family: var(--font-display);
  color: var(--text-white);
}

.ring-center-label {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.hero-quote-bar {
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--orange-500);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  line-height: 1.45;
}

/* Live Protein Progress Card */
.protein-tracker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.protein-top-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.protein-value-big {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.protein-target-small {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.protein-status-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.protein-status-pill.qualifies {
  background: var(--green-subtle);
  color: var(--green-400);
  border-color: rgba(16, 185, 129, 0.3);
}

.protein-status-pill.completed {
  background: var(--gold-subtle);
  color: var(--gold-500);
  border-color: rgba(245, 158, 11, 0.3);
}

.protein-meter-bar {
  height: 10px;
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.protein-fill-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange-500), var(--gold-500));
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

.protein-streak-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.protein-meta-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Checklist Cards (Meals) */
.checklist-item-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.meal-check-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: var(--tap-min);
  box-shadow: var(--shadow-sm);
}

.meal-check-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.meal-check-card:active {
  transform: scale(0.985);
}

.meal-check-card.checked {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.32);
}

.meal-checkbox-square {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid var(--border-medium);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: transparent;
  font-size: 16px;
  font-weight: 900;
}

.meal-check-card.checked .meal-checkbox-square {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--green-glow);
}

.meal-check-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meal-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meal-slot-pill {
  font-size: 12px;
  font-weight: 800;
  color: var(--orange-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meal-protein-badge {
  font-size: 12px;
  font-weight: 800;
  background: var(--orange-subtle);
  color: var(--orange-400);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.meal-check-card.checked .meal-protein-badge {
  background: var(--green-subtle);
  color: var(--green-400);
}

.meal-menu-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.45;
}

.meal-check-card.checked .meal-menu-text {
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}

/* Supplement Micro Badge */
.meal-supp-badge {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-surface);
  color: var(--gold-500);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(245, 158, 11, 0.25);
  width: fit-content;
}

.supp-check-action {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.meal-supp-badge.taken {
  background: var(--green-subtle);
  color: var(--green-400);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Habit Widgets (Water & Steps) */
.habits-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.habit-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  box-shadow: var(--shadow-sm);
}

.habit-head-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.habit-big-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-white);
  font-family: var(--font-display);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.habit-big-val small {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.habit-steppers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.btn-habit-step {
  flex: 1;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-habit-step:hover {
  background: var(--bg-card-hover);
}

.btn-habit-step:active {
  transform: scale(0.95);
}

.steps-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 0;
}

/* Workout Cards */
.workout-exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}

.workout-exercise-card.completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, var(--bg-card), rgba(16, 185, 129, 0.04));
}

.workout-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.workout-ex-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-white);
}

.workout-ex-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.workout-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}

.workout-status-chip {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}

.workout-exercise-card.completed .workout-status-chip {
  background: var(--green-subtle);
  color: var(--green-400);
  border-color: rgba(16, 185, 129, 0.3);
}

.workout-cue-box {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange-500);
  line-height: 1.45;
}

.btn-open-set-log {
  width: 100%;
  height: var(--tap-min);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-set-log:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.btn-open-set-log.completed {
  background: var(--green-subtle);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--green-400);
}

/* Rest Day Card */
.rest-day-card-full {
  background: linear-gradient(145deg, var(--bg-card), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.rest-day-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rest-day-avatar {
  font-size: 32px;
}

/* Set Logger Drawer Specifics */
.set-row-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.set-row-wrap.done {
  border-color: rgba(16, 185, 129, 0.4);
  background: var(--green-subtle);
}

.set-number-label {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-secondary);
  width: 32px;
}

.set-inputs-flex {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.step-control-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.step-label-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-buttons-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-step-mini {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.step-input-num {
  width: 48px;
  height: 30px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-white);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.last-session-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.pr-congrats-chip {
  background: rgba(16, 185, 129, 0.25);
  color: var(--green-400);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
}

.btn-set-done-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 2px solid var(--border-medium);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.set-row-wrap.done .btn-set-done-toggle {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
  box-shadow: 0 2px 10px var(--green-glow);
}

/* ----------------------------------------------------
   2. WEEK SCREEN (7-DAY GRID MATRIX)
   ---------------------------------------------------- */
.week-navigator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.week-display-range {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-white);
}

.week-matrix-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.week-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.week-day-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.week-day-card:active {
  transform: scale(0.985);
}

.week-day-card.today-highlight {
  border-color: var(--orange-500);
  background: linear-gradient(145deg, var(--bg-card), var(--orange-subtle));
}

.week-day-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.week-day-title-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-mini-badge {
  font-size: 10px;
  background: var(--orange-500);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.week-day-sub-text {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.week-day-chips-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-status-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 800;
}

.pill-green {
  background: var(--green-subtle);
  color: var(--green-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pill-yellow {
  background: var(--gold-subtle);
  color: var(--gold-500);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.pill-grey {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.pill-rest {
  background: var(--cyan-subtle);
  color: var(--cyan-500);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* ----------------------------------------------------
   3. PROGRESS SCREEN (SVG CHARTS & CHECK-IN)
   ---------------------------------------------------- */
.chart-box-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.chart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-box-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-white);
}

.chart-responsive-svg-wrap {
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.chart-svg-element {
  width: 100%;
  height: 100%;
}

.chart-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.checkin-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: var(--space-md);
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.checkin-thumb-pic {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-surface);
  cursor: pointer;
  flex-shrink: 0;
}

/* ----------------------------------------------------
   4. PLAN SCREEN (VIEW & EDIT)
   ---------------------------------------------------- */
.day-scroller-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.day-scroller-tabs::-webkit-scrollbar {
  display: none;
}

.btn-day-tab {
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-day-tab.active {
  background: var(--orange-500);
  color: #fff;
  border-color: var(--orange-500);
  box-shadow: 0 2px 12px var(--orange-glow);
}

.plan-card-editor {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.form-group-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-text-clean, .textarea-clean, .select-clean {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.input-text-clean:focus, .textarea-clean:focus, .select-clean:focus {
  outline: none;
  border-color: var(--orange-500);
}

/* ----------------------------------------------------
   STREAK HEATMAP & MILESTONES MODAL
   ---------------------------------------------------- */
.milestones-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.milestone-trophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.milestone-trophy-card.unlocked {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, var(--bg-card), var(--gold-subtle));
}

.heatmap-7col-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.heatmap-square {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

.heatmap-square.done-food {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-500);
}

.heatmap-square.done-workout {
  background: var(--orange-500);
  color: #fff;
  border-color: var(--orange-500);
}

.heatmap-square.done-both {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
}
