/* ============================================================
   Fit cesta — refined warm minimal UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Warm cream palette */
  --bg:           #faf6f1;
  --bg-soft:      #f3eee5;
  --card:         #ffffff;
  --border:       #ebe2d4;
  --border-soft:  #f1ebe0;
  --text:         #1a1814;
  --text-muted:   #76706a;
  --text-faint:   #b3aca3;

  /* Accent */
  --accent:       #c8543a;        /* terracotta */
  --accent-dark:  #a3402a;
  --accent-soft:  #f9e9e3;

  /* Semantic */
  --ok:           #5a7a52;        /* sage */
  --ok-soft:      #e7eee2;
  --warn:         #c08a2a;
  --warn-soft:    #f5ebd0;
  --water:        #4a7a8c;        /* deep teal */
  --water-soft:   #e1ecef;
  --danger:       #b53a3a;

  /* Type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --radius:       14px;
  --radius-sm:    10px;
  --shadow-soft:  0 1px 2px rgba(26,24,20,.04), 0 4px 12px rgba(26,24,20,.04);
  --shadow-mid:   0 2px 4px rgba(26,24,20,.06), 0 8px 24px rgba(26,24,20,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01","cv11";
  padding-bottom: 88px; /* miesto na bottom nav */
  background-image:
    radial-gradient(circle at 10% 0%, rgba(200,84,58,.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(90,122,82,.04) 0%, transparent 40%);
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ TOPBAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(250,246,241,.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 19px; font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.hello { font-size: 13px; color: var(--text-muted); }
.hello strong { color: var(--text); font-weight: 600; }

/* ============ CONTAINER ============ */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.page-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 8px 0 4px;
  line-height: 1.1;
}

h2 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
h3.sub {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 18px 0 10px;
}

.muted       { color: var(--text-muted); }
.small       { font-size: 13px; }
.ok          { color: var(--ok); }
.warn        { color: var(--warn); }
.danger      { color: var(--danger); }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ============ CARD ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow-soft);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h2 { margin: 0; }
.link-sm { font-size: 13px; color: var(--accent); }

/* ============ HERO (dashboard) ============ */
.hero {
  background:
    linear-gradient(135deg, #fff 0%, #fcf5ef 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.hero-row {
  position: relative;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
}
.hero-target { text-align: right; }

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.kpi-value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.hero-target .kpi-value { color: var(--accent); }
.kpi-sub { font-size: 13px; margin-top: 4px; }

/* ============ PROGRESS BAR ============ */
.progress-bar {
  position: relative;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
}
.progress-bar.small { height: 5px; margin-top: 8px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.progress-fill.water {
  background: linear-gradient(90deg, var(--water), #2f5e6e);
}
.progress-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

/* ============ STATS GRID ============ */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 540px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.stat .stat-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat .stat-value {
  font-family: var(--serif);
  font-size: 26px; font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.stat .stat-value span {
  font-size: 14px;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.stat .stat-sub {
  font-size: 12px; color: var(--text-muted);
  margin-top: 6px;
}

.water-card { background: linear-gradient(180deg, #fff 0%, var(--water-soft) 200%); }

/* Quick water buttons */
.water-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--water);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { background: var(--water-soft); border-color: var(--water); }
.chip.ghost { color: var(--text-muted); }

/* ============ ACTION CARDS ============ */
.action {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-mid);
  text-decoration: none;
}
.action-ico {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-family: var(--serif);
}
.action-title { font-weight: 600; }
.action-sub   { color: var(--text-muted); }

/* ============ GOALS ============ */
.goals { list-style: none; padding: 0; margin: 0; }
.goals li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.goals li:last-child { border-bottom: 0; }
.goal-title { font-weight: 600; margin-bottom: 2px; }
.goal-meta  { margin-bottom: 4px; }
.goal-desc  { color: var(--text-muted); }

/* ============ FORM ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (min-width: 540px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: span 2; }
  .form-grid .span-3 { grid-column: span 2; }
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr 1fr; }
  .form-grid .span-3 { grid-column: span 3; }
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
label > input, label > select, label > textarea {
  display: block; width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  transition: border-color .15s, box-shadow .15s;
}
label > input:focus, label > select:focus, label > textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 70px; }

input[type="file"] {
  font-size: 13px;
  padding: 8px;
}

.row-buttons {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  letter-spacing: .01em;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(.98); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--bg-soft); }

.btn-ghost-sm {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost-sm:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.btn-ghost-sm.danger:hover { background: #fbe9e7; color: var(--danger); border-color: #f1c4be; }

/* ============ ALERTS ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert.ok  { background: var(--ok-soft); color: var(--ok); border-color: #cdd9c5; }
.alert.err { background: #fbe9e7; color: var(--danger); border-color: #f1c4be; }

.info-box {
  padding: 12px 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
}
.info-box strong { color: var(--text); }

/* ============ TABLE ============ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table .actions {
  white-space: nowrap;
  text-align: right;
}
.data-table .actions form.ix { display: inline-block; margin-left: 4px; }

.thumb-link {
  display: inline-block;
  padding: 2px 6px;
  text-decoration: none;
  font-size: 16px;
}

/* Goal row colors */
.goal-row.goal-done td { opacity: .6; }
.goal-row.goal-paused td { opacity: .5; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 99px;
  background: var(--bg-soft);
  color: var(--text-muted);
}
.badge.active { background: var(--accent-soft); color: var(--accent-dark); }
.badge.done   { background: var(--ok-soft); color: var(--ok); }

/* ============ RATING (mood/energy/hunger) ============ */
.rating-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (min-width: 540px) {
  .rating-grid { grid-template-columns: repeat(3, 1fr); }
}
.rating-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.rating {
  display: flex;
  gap: 4px;
}
.rating label {
  flex: 1;
  margin: 0;
  cursor: pointer;
}
.rating input { display: none; }
.rating span {
  display: block;
  text-align: center;
  padding: 10px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-muted);
  font-family: var(--serif);
  transition: all .15s;
}
.rating input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.rating-clear span { font-family: var(--sans); font-size: 14px; }
.rating input:checked + span { transform: scale(1.05); }

/* ============ JOURNAL LIST ============ */
.journal-list { list-style: none; padding: 0; margin: 0; }
.journal-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.journal-list li:last-child { border-bottom: 0; }
.j-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.j-head strong { font-family: var(--serif); font-size: 16px; }
.j-stats {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
}
.j-actions { display: flex; gap: 4px; }
.j-actions .ix { display: inline-block; }
.j-entry {
  font-size: 14px;
  color: var(--text);
  padding: 6px 0 0;
  white-space: pre-wrap;
}

/* ============ LOGIN ============ */
.login-body {
  background: var(--bg);
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 16px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 36px 28px;
  box-shadow: var(--shadow-mid);
  border: 1px solid var(--border-soft);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.login-logo h1 {
  font-family: var(--serif);
  font-size: 26px; font-weight: 600;
  margin: 0;
  letter-spacing: -.01em;
}
.login-card form { margin-top: 18px; }
.login-card .hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a .ico {
  font-size: 18px;
  font-family: var(--serif);
  line-height: 1;
}
.bottom-nav a.active {
  color: var(--accent);
}
.bottom-nav a.active::before {
  content: '';
  position: absolute; top: 0; left: 30%; right: 30%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

/* ============ INLINE FORM ============ */
.inline-form { margin-bottom: 18px; }

/* utility */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   WEEK 2 — Tréning, jedlo, recepty
   ============================================================ */

/* Bottom nav 5 položiek (užšia šírka) */
.bottom-nav { padding: 0 .25rem; }
.bottom-nav a { font-size: .68rem; padding: .55rem .15rem; }
.bottom-nav a .ico { font-size: 1.15rem; margin-bottom: .15rem; }

/* Back link */
.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  margin-bottom: .5rem;
}
.back-link:hover { color: var(--accent); }

/* Card head row */
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .75rem;
}
.card-head h2 { margin: 0; }
.link-sm {
  color: var(--accent);
  font-size: .85rem;
  text-decoration: none;
}
.link-sm:hover { text-decoration: underline; }

/* Block buttons (full width) */
.btn-primary.block, .btn-ghost.block {
  display: block;
  width: 100%;
  margin-top: .75rem;
  text-align: center;
}
.btn-primary-sm {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: .35rem .7rem;
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
}
.btn-primary-sm:hover { background: var(--accent-dark); }
.btn-ghost-sm {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: .25rem .55rem;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost-sm:hover { color: var(--text); border-color: var(--accent); }
.btn-ghost-sm.danger:hover { color: #b53a25; border-color: #b53a25; }
.btn-ghost-sm.disabled { opacity: .35; pointer-events: none; }

.btn-ok {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.btn-ok:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.set-row.done .btn-ok { background: var(--success); color: #fff; border-color: var(--success); }

/* Workout today — dashboard widget */
.workout-today { border-left: 3px solid var(--accent); }
.workout-today.rest-day { border-left-color: var(--border); opacity: .8; }
.workout-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: .25rem 0 .5rem;
}
.workout-status {
  font-size: .85rem;
  color: var(--muted);
  margin: .5rem 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.workout-status.active { color: var(--accent); font-weight: 500; }
.workout-status.done { color: var(--success); }
.workout-status .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

.rest-message {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
}
.rest-ico {
  width: 36px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Plan items list */
.plan-items {
  list-style: decimal inside;
  padding-left: 0;
  margin: .5rem 0;
}
.plan-items li { padding: .4rem 0; border-bottom: 1px dashed var(--border); }
.plan-items li:last-child { border: 0; }
.plan-items.mini li { padding: .2rem 0; display: flex; justify-content: space-between; }
.pi-name { font-weight: 500; }
.pi-meta { font-size: .85rem; color: var(--muted); margin-top: .15rem; }

/* Week plans */
.week-plans { list-style: none; padding: 0; }
.week-plans li {
  padding: .6rem .25rem;
  border-bottom: 1px solid var(--border);
}
.week-plans li:last-child { border: 0; }
.week-plans li.today {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding-left: .5rem;
}
.wp-day {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .05em;
}
.wp-name { font-weight: 500; margin: .15rem 0; }
.week-plans details { margin-top: .25rem; }
.week-plans summary { cursor: pointer; user-select: none; }

/* Session list (history) */
.session-list { list-style: none; padding: 0; }
.session-list li {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.session-list li:last-child { border: 0; }
.ses-row {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem;
  padding: .55rem .25rem;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.ses-row:hover { background: var(--bg-soft); }
.ses-date { font-size: .8rem; color: var(--muted); min-width: 60px; }
.ses-name { font-weight: 500; }
.ses-meta { text-align: right; }
.ses-del { padding: 0 .25rem; }

.badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
}
.badge.active { background: #fce8d8; color: #a23a18; }
.badge.done   { background: #d8e8d8; color: #2e6c2e; }
.badge.muted  { background: var(--bg-soft); color: var(--muted); }

/* Exercise block (workout session) */
.exercise-block.all-done { opacity: .85; border-left: 3px solid var(--success); }
.ex-head { margin-bottom: .5rem; }
.ex-num {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  margin-right: .25rem;
}
.ex-head h2 {
  display: inline;
  font-size: 1.05rem;
  margin: 0;
}
.ex-note { font-style: italic; color: var(--text); margin-top: .3rem; }
.ex-cues { margin-top: .25rem; }

.sets-grid {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .65rem;
}
.sets-head, .set-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 1fr 36px;
  gap: .35rem;
  align-items: center;
}
.sets-head {
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .05em;
}
.set-row input[type="number"] {
  padding: .35rem .4rem;
  font-size: .95rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.set-row.done input { background: #f3f7f3; border-color: #cfe0cf; }
.set-no {
  width: 28px; height: 28px;
  background: var(--bg-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: .85rem;
  color: var(--muted);
}
.set-row.done .set-no { background: var(--success); color: #fff; }

/* Macros */
.macros-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: .5rem;
}
.macro-cell .m-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.macro-cell .m-val {
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin: .15rem 0;
}
.macro-cell .m-val span { font-size: .85rem; font-weight: 400; color: var(--muted); }
.macro-cell .m-sub { margin-top: .25rem; }

.macros-mini {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--muted);
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}

.progress-fill.protein { background: linear-gradient(90deg, #6a8a52, #8eb16e); }
.progress-fill.water { background: linear-gradient(90deg, #5a8db5, #7fa9c9); }

/* Meal blocks */
.meal-block .meal-items { list-style: none; padding: 0; }
.meal-items li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  gap: .5rem;
}
.meal-items li:last-child { border: 0; }
.mi-name { font-weight: 500; }
.mi-name span, .mi-name em { font-weight: 400; margin-left: .25rem; }
.mi-macros { grid-column: 1 / -1; padding-top: .15rem; }
.ix { display: inline; }

/* Day switch */
.day-switch {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .5rem .75rem;
  background: var(--bg-soft);
  border-radius: 8px;
}
.day-switch input[type="date"] {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: .95rem;
  text-align: center;
  font-family: inherit;
}
.day-switch .link-sm { margin-left: auto; }

/* Search results (meals) */
.search-form {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
}
.search-form input[type="search"] {
  flex: 1;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
}
.search-results { list-style: none; padding: 0; max-height: 420px; overflow-y: auto; }
.search-results li {
  border-bottom: 1px solid var(--border);
  padding: .5rem 0;
}
.search-results li:last-child { border: 0; }
.search-results li.recipe { background: linear-gradient(to right, #fcf8f2 0%, transparent 60%); }
.quick-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
}
.sr-info { display: flex; flex-direction: column; }
.sr-name { font-weight: 500; }
.sr-name a { color: inherit; text-decoration: none; }
.sr-name a:hover { color: var(--accent); }
.sr-controls {
  display: grid;
  grid-template-columns: 80px 1fr 36px;
  gap: .35rem;
  align-items: center;
}
.sr-amount { padding: .35rem; font-size: .9rem; text-align: center; border: 1px solid var(--border); border-radius: 6px; }
.sr-meal { padding: .35rem; font-size: .9rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* Custom meal form */
.custom-meal { margin-top: 1rem; }
.custom-meal summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  padding: .5rem 0;
}
.custom-form { padding-top: .5rem; }
.dup-yesterday { margin-top: .75rem; }

/* Recipe grid */
.recipe-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
@media (min-width: 480px) {
  .recipe-grid { grid-template-columns: 1fr 1fr; }
}
.recipe-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.recipe-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.rc-link {
  display: block;
  padding: .85rem;
  text-decoration: none;
  color: inherit;
}
.recipe-card h3 {
  font-size: 1rem;
  margin: 0 0 .35rem;
  font-family: var(--font-display);
}
.rc-macros {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .35rem;
}
.rc-macros strong { color: var(--text); font-size: .95rem; }
.tag-gf {
  display: inline-block;
  background: #d8e8d8;
  color: #2e6c2e;
  padding: .05rem .35rem;
  border-radius: 3px;
  font-size: .65rem;
  font-weight: 700;
}

/* Recipe filters */
.recipe-filters {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.recipe-filters input[type="search"] {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .95rem;
}
.filter-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-row label.cb {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
  cursor: pointer;
}
.filter-row select {
  padding: .4rem .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: .9rem;
}
.filter-actions { display: flex; gap: .5rem; }

/* Recipe detail */
.recipe-macros-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  text-align: center;
}
.recipe-macros-row > div {
  padding: .5rem;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: .85rem;
}
.recipe-macros-row strong {
  display: block;
  font-size: 1.15rem;
  font-family: var(--font-display);
  color: var(--accent);
}
.ingredient-list { list-style: none; padding: 0; }
.ingredient-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--border);
  gap: .5rem;
  align-items: baseline;
}
.ingredient-list li:last-child { border: 0; }
.ig-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: .9rem;
}
.ig-note { display: block; }
.instructions {
  font-family: inherit;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--bg-soft);
  padding: .75rem;
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.55;
  border: 0;
}

/* Action card stat (clickable) */
.action-stat {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s, transform .15s;
}
.action-stat:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Freeform workout form */
.freeform {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.freeform label { display: block; font-size: .85rem; color: var(--muted); }
.freeform input[type="text"] {
  width: 100%;
  margin-top: .35rem;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Finish card */
.finish-card { background: var(--bg-soft); }

/* Span helper */
.form-grid label.span-2 { grid-column: span 2; }

/* ============================================================
   WEEK 3 v4 — komplet refactor inspirovany MFP / kalorickými tabulkami
   ============================================================ */

/* PAGE HEADER */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.page-header .page-title { margin: 0; }

.link-action {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  padding: .35rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .15s;
}
.link-action:hover { border-color: var(--accent); background: var(--bg-soft); }

/* ===========================================================
   MEALS — MFP-style
   =========================================================== */
.diary-page { max-width: 720px; margin: 0 auto; }

/* DAY NAV */
.dnav {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.dnav-arrow {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 300;
  transition: background .15s;
  border-right: 1px solid var(--border);
  user-select: none;
}
.dnav-arrow:last-child { border-right: 0; border-left: 1px solid var(--border); }
.dnav-arrow:hover { background: var(--bg-soft); color: var(--accent); }
.dnav-arrow.is-disabled { opacity: .3; pointer-events: none; }
.dnav-mid {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .65rem;
}
.dnav-mid input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  border: 0;
}
.dnav-label {
  font-weight: 500;
  pointer-events: none;
}

/* KCAL HERO — velky a citatelny ako MFP */
.kcal-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: .75rem;
  text-align: center;
}
.kh-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.kh-block {
  text-align: center;
  min-width: 70px;
}
.kh-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kh-block.kh-remain .kh-num {
  color: var(--accent);
  font-size: 2.25rem;
}
.kh-block.kh-remain.over .kh-num { color: #b53a25; }
.kh-lbl {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: .35rem;
}
.kh-op {
  font-size: 1.4rem;
  color: var(--muted);
  font-weight: 300;
  padding: 0 .25rem;
}
.kh-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .5rem;
}
.kh-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}

/* MAKRA — 3 stlpce s minimalistickymi progress bars */
.macros-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.m-card {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .85rem;
  min-width: 0;
}
.m-name {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  font-weight: 500;
}
.m-vals {
  font-size: 1.05rem;
  margin-top: .15rem;
  font-variant-numeric: tabular-nums;
}
.m-vals strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.m-of { color: var(--muted); font-weight: 400; font-size: .85rem; }
.m-bar {
  height: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .5rem;
}
.m-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.m-card.protein .m-bar-fill { background: #6a8a52; }
.m-card.carbs .m-bar-fill   { background: #c4953f; }
.m-card.fat .m-bar-fill     { background: #a16b8e; }

@media (max-width: 480px) {
  .macros-row { flex-direction: column; }
}

/* ACTIONS ROW (Recepty / Nakup / Skopirovat) */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.ar-link {
  display: inline-block;
  padding: .45rem .85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.ar-link:hover { border-color: var(--accent); color: var(--accent); }
.ar-inline { display: inline; }
.ar-inline button { font-family: inherit; }

/* MEAL CARDS */
.meal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: .75rem;
  overflow: hidden;
}
.mc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.mc-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.mc-icon {
  margin-right: .35rem;
  font-size: 1.1rem;
}
.mc-kcal {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}
.mc-kcal .muted { font-weight: 400; font-size: .85rem; }

.mc-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mc-item {
  display: flex;
  align-items: center;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: .5rem;
}
.mc-item:last-child { border-bottom: 0; }
.mci-main { flex: 1; min-width: 0; }
.mci-name {
  font-weight: 500;
  margin-bottom: .15rem;
}
.mci-name a { color: var(--accent); text-decoration: none; }
.mci-name a:hover { text-decoration: underline; }
.mci-amount {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: .35rem;
}
.mci-macros {
  font-size: .8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mci-mac { opacity: .4; padding: 0 .15rem; }
.btn-x {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 300;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.btn-x:hover { background: var(--bg-soft); color: #b53a25; }

.mc-add {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--border);
  cursor: pointer;
  color: var(--accent);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s;
}
.mc-add:hover { background: var(--bg-soft); }
.mc-add-plus {
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.more-meals-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}
.chip-btn {
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.chip-btn:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

/* ADD MODAL — autocomplete picker */
.add-modal, .qty-modal {
  position: fixed;
  inset: 0;
  background: rgba(43, 30, 25, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 2rem 1rem 1rem;
  animation: fadeIn .15s;
}
.add-modal[hidden], .qty-modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.am-box, .qm-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.am-close, .qm-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
  z-index: 1;
}
.am-close:hover, .qm-close:hover { background: var(--bg-soft); color: var(--text); }

.am-head {
  padding: 1.25rem 3rem 0 1.25rem;
}
.am-head h2 {
  margin: 0 0 .15rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.am-search {
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.am-search input {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-soft);
}
.am-search input:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
}

.am-results {
  flex: 1;
  overflow-y: auto;
  min-height: 80px;
  max-height: 50vh;
}
.am-empty {
  padding: 1.25rem;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}
.am-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.am-item:last-child { border-bottom: 0; }
.am-item:hover, .am-item.active { background: var(--bg-soft); }
.am-item-main { flex: 1; min-width: 0; padding-right: .75rem; }
.am-name {
  font-weight: 500;
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am-name mark {
  background: #fff5d8;
  padding: 0;
  font-weight: 700;
}
.am-meta {
  font-size: .8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am-meta strong { color: var(--text); }
.am-meta em { font-style: normal; opacity: .7; }
.am-tag {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 .35rem;
  font-size: .65rem;
  margin-right: .25rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
}
.am-tag.recipe { background: #fce8d8; color: #a23a18; border-color: #f0c8b0; }
.ac-warn { font-size: .85rem; opacity: .8; margin-left: .25rem; }
.am-add-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.am-custom-link {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.am-custom-link a {
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
}
.am-custom-form {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}
.am-custom-form label {
  display: block;
  margin-bottom: .5rem;
  font-size: .85rem;
  color: var(--muted);
}
.am-custom-form input,
.am-custom-form select {
  width: 100%;
  margin-top: .25rem;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: .95rem;
  font-family: inherit;
}
.cf-grid {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
}
.cf-grid label {
  flex: 1;
}
.cf-grid label > input { padding: .45rem; }

/* QTY MODAL */
.qm-box { padding: 1.25rem; max-width: 420px; }
.qm-box h3 {
  margin: 0 0 .25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  padding-right: 2rem;
}
.qm-form {
  display: flex;
  gap: .75rem;
  margin: 1rem 0 .75rem;
}
.qm-form label {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  color: var(--muted);
  font-weight: 500;
}
.qm-form input, .qm-form select {
  margin-top: .35rem;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  font-family: inherit;
}
.qm-form input:focus, .qm-form select:focus {
  outline: 0;
  border-color: var(--accent);
}
.qm-preview {
  background: var(--bg-soft);
  padding: .65rem .85rem;
  border-radius: 8px;
  font-size: .9rem;
  text-align: center;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
.qm-preview strong { font-size: 1.1rem; color: var(--accent); }
.qm-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

/* ===========================================================
   RECIPE — clean, robust flexbox layout
   =========================================================== */
.recipe-page { max-width: 720px; margin: 0 auto; }
.back-link {
  display: inline-block;
  margin-bottom: .75rem;
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
}
.back-link:hover { text-decoration: underline; }

.rp-hero { margin-bottom: 1rem; }
.rp-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0 0 .5rem;
  line-height: 1.15;
}
.rp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
}
.rp-meta-item { white-space: nowrap; }
.rp-tag-gf, .rp-tag-df {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.rp-tag-gf { background: #e0e9d4; color: #4a6a26; }
.rp-tag-df { background: #fce4d6; color: #b04a18; }

/* MAKRA - flex 4 stlpce s explicitnymi pripravkami */
.rp-macros {
  display: flex;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem .5rem;
  margin-bottom: .25rem;
  gap: .25rem;
}
.rpm-cell {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border);
  padding: 0 .25rem;
  min-width: 0;
}
.rpm-cell:last-child { border-right: 0; }
.rpm-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.rpm-cell.rpm-kcal .rpm-num { color: var(--accent); font-size: 1.6rem; }
.rpm-lbl {
  font-size: .7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-top: .25rem;
}
.rp-macros-suffix {
  text-align: center;
  margin-bottom: 1.25rem;
}

/* RP BLOCKS */
.rp-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.rp-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.rp-block-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.rp-scaler {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.rps-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  font-family: inherit;
  color: var(--accent);
}
.rps-btn:hover { background: var(--bg-soft); border-color: var(--accent); }
.rps-val {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.15rem;
  min-width: 24px;
  text-align: center;
  color: var(--accent);
}

/* INGREDIENT LIST */
.rp-ing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rp-ing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--border);
}
.rp-ing:last-child { border-bottom: 0; }
.rp-ing-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  color: var(--accent);
  font-family: var(--font-display);
}
.rp-ing-pieces { font-style: italic; }
.rp-ing-name { flex: 1; min-width: 0; }
.rp-ing-note { white-space: nowrap; }

/* POSTUP */
.rp-steps {
  padding-left: 1.5rem;
  margin: 0;
  line-height: 1.6;
}
.rp-steps li {
  padding: .5rem 0;
  border-bottom: 1px dashed var(--border);
}
.rp-steps li:last-child { border-bottom: 0; }
.rp-steps li::marker {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
}

/* ADD TO DIARY */
.rp-add-form { }
.rp-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .75rem;
}
.rp-add-row label {
  flex: 1;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  color: var(--muted);
  font-weight: 500;
}
.rp-add-row input,
.rp-add-row select {
  margin-top: .25rem;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: .95rem;
  font-family: inherit;
}

/* ===========================================================
   RECIPES LIST — clean cards, robust grid
   =========================================================== */
.recipes-page { max-width: 920px; margin: 0 auto; }
.rcp-header { margin-bottom: 1rem; }
.rcp-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0;
}
.rcp-sub { margin: .25rem 0 0; }

.rcp-filters {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.rcp-filter-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.rcp-search {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-soft);
  font-family: inherit;
}
.rcp-search:focus {
  outline: 0;
  border-color: var(--accent);
  background: #fff;
}

.rcp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.rcp-chip {
  padding: .4rem .9rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  font-size: .85rem;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.rcp-chip:hover { border-color: var(--accent); }
.rcp-chip.active { background: var(--accent); color: #fff; }

.rcp-extra-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}
.rcp-select {
  padding: .5rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: .9rem;
}
.rcp-cb {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
  cursor: pointer;
  user-select: none;
}

.rcp-group { margin-bottom: 1.5rem; }
.rcp-group-title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 .65rem;
}
.rcp-group-icon { font-size: 1.3rem; }
.rcp-group-count { color: var(--muted); font-size: .85rem; font-weight: 400; }

.rcp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}
@media (min-width: 540px) {
  .rcp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .rcp-grid { grid-template-columns: repeat(3, 1fr); }
}

.rcp-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.rcp-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200,84,58,.1);
}
.rcp-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: .65rem;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--accent);
}
.rcp-card-stats {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .35rem;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}
.rcp-card-kcal {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.rcp-card-kcal-lbl {
  color: var(--muted);
  font-size: .8rem;
  margin-right: .25rem;
}
.rcp-card-time {
  color: var(--muted);
  font-size: .85rem;
  margin-left: auto;
}
.rcp-card-gf {
  display: inline-block;
  padding: .1rem .4rem;
  background: #e0e9d4;
  color: #4a6a26;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.rcp-card-macros {
  font-variant-numeric: tabular-nums;
}
.empty-card { text-align: center; padding: 2rem; }

/* ===========================================================
   EXERCISE DETAIL + LIBRARY
   =========================================================== */
.exercise-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ex-icon {
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-display);
}
.ex-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .35rem;
}
.tag, .tag-cat {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  background: var(--bg-soft);
  color: var(--text);
}
.tag.muted { color: var(--muted); }
.tag.mono { font-family: monospace; }
.tag-cat.push   { background: #fce4d6; color: #b04a18; }
.tag-cat.pull   { background: #d8e4fc; color: #2c4a8c; }
.tag-cat.legs   { background: #e0e9d4; color: #4a6a26; }
.tag-cat.glutes { background: #f0d8e8; color: #8b3870; }
.tag-cat.core   { background: #fce8c8; color: #8a5a14; }

.info-card { padding: 1rem 1.25rem; }
.info-card h2 {
  font-size: 1rem;
  margin: 0 0 .5rem;
  font-family: var(--font-display);
}
.cue-card { border-left: 3px solid #c4953f; }
.mistake-card { border-left: 3px solid #b53a25; }
.progression-card { border-left: 3px solid #6a8a52; }
.ex-text { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.ex-text.small { font-size: .9rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.pb-row {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.pb-label { font-size: .85rem; color: var(--muted); }
.pb-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
}
.history-details summary {
  cursor: pointer;
  color: var(--muted);
  padding: .5rem 0;
  font-size: .9rem;
}
.history-list {
  list-style: none;
  padding: 0;
  margin: .5rem 0 0;
  font-variant-numeric: tabular-nums;
}
.history-date {
  font-weight: 600;
  font-size: .85rem;
  color: var(--accent);
  padding: .5rem 0 .15rem;
  margin-top: .35rem;
  border-top: 1px dashed var(--border);
}
.history-date:first-child { border: 0; margin: 0; padding-top: 0; }
.history-set { padding: .15rem 0 .15rem .75rem; font-size: .9rem; }

/* EXERCISES LIBRARY */
.ex-category { margin-bottom: 1.5rem; }
.cat-heading {
  font-size: 1.15rem;
  margin: 0 0 .65rem;
  font-family: var(--font-display);
}
.ex-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}
@media (min-width: 640px) {
  .ex-grid { grid-template-columns: 1fr 1fr; }
}
.ex-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all .15s;
}
.ex-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.ex-card-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  text-decoration: none;
  color: inherit;
}
.ex-card-icon {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  background: var(--bg-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-display);
}
.ex-card-name { font-weight: 500; margin-bottom: .15rem; }
.ex-card-meta { font-size: .8rem; color: var(--muted); }

.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.filter-bar input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}
.filter-bar select {
  padding: .5rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
}

/* ===========================================================
   WORKOUT SESSION — vylepsene
   =========================================================== */
.session-hero { margin-bottom: 1.25rem; }
.session-hero .page-title { margin-bottom: .25rem; }
.session-meta { color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.session-progress { margin-top: .5rem; }
.session-progress .progress-meta { margin-top: .25rem; font-size: .8rem; color: var(--muted); }

.exercise-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: .75rem;
}
.exercise-block.all-done {
  border-left: 3px solid var(--success);
  background: linear-gradient(to right, #f5faf5 0%, #fff 30%);
}
.ex-header {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .5rem;
}
.ex-badge {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  margin-top: .15rem;
}
.exercise-block.all-done .ex-badge { background: var(--success); }
.ex-title-wrap { flex: 1; min-width: 0; }
.ex-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
}
.ex-title-row h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-display);
}
.ex-info-btn {
  width: 28px;
  height: 28px;
  background: var(--bg-soft);
  color: var(--muted);
  text-decoration: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  transition: all .15s;
}
.ex-info-btn:hover { background: var(--accent); color: #fff; }
.ex-spec {
  margin-top: .35rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.spec-pill {
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.spec-pill.muted { color: var(--muted); }
.spec-pill.last { background: #d8e4fc; color: #2c4a8c; font-style: italic; }
.ex-note { margin-top: .35rem; color: var(--muted); font-style: italic; }

.ex-cues-toggle {
  margin: .75rem 0;
  background: #fff8e6;
  border: 1px solid #f0e0b4;
  border-radius: 8px;
  padding: .65rem .85rem;
}
.ex-cues-toggle summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: #8a5a14;
  user-select: none;
}
.ex-cues-toggle[open] summary { margin-bottom: .65rem; }
.ex-cues-text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ex-mistakes {
  margin: .65rem 0 0;
  font-size: .9rem;
  padding-top: .65rem;
  border-top: 1px dashed #f0e0b4;
}
.ex-mistakes strong { color: #b53a25; }
.link-sm {
  display: inline-block;
  margin-top: .65rem;
  font-size: .85rem;
  color: var(--accent);
  text-decoration: none;
}
.link-sm:hover { text-decoration: underline; }

/* SHOPPING — drobne */
.list-of-lists {
  list-style: none;
  padding: 0;
}
.list-of-lists li {
  border-bottom: 1px solid var(--border);
}
.list-of-lists li:last-child { border: 0; }
.list-of-lists a {
  display: block;
  padding: .85rem;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.list-of-lists a:hover { background: var(--bg-soft); }
.lol-name { font-weight: 600; margin-bottom: .15rem; font-family: var(--font-display); }
.lol-meta { margin-bottom: .35rem; }

.recipe-picker {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .25rem;
  margin-top: .5rem;
}
.rp-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .5rem;
  align-items: center;
  cursor: pointer;
  border-radius: 6px;
}
.rp-row:hover { background: var(--bg-soft); }
.rp-row > input[type="checkbox"] { flex-shrink: 0; }
.rp-name { font-size: .9rem; flex: 1; min-width: 100px; }
.rp-serv {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.rp-serv input {
  width: 50px;
  padding: .2rem .35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-family: inherit;
}

.shop-category { margin-bottom: 1rem; }
.shop-list {
  list-style: none;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.shop-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: .25rem 0;
}
.shop-item:last-child { border: 0; }
.shop-item.checked .shop-item-name {
  text-decoration: line-through;
  color: var(--muted);
}
.shop-toggle { display: flex; }
.shop-check {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  margin: 0 .65rem 0 .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: transparent;
  transition: all .15s;
  flex-shrink: 0;
  font-family: inherit;
}
.shop-item.checked .shop-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.shop-check:hover { border-color: var(--accent); }
.shop-item-name { flex: 1; padding: .65rem 0; }
.shop-del { display: flex; padding: 0 .25rem; }
.progress-card { padding: .75rem 1rem; }
.progress-card .progress-meta { margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.progress-bar.small { height: 4px; }

.add-shop-item label {
  display: block;
  margin-bottom: .5rem;
  font-size: .85rem;
  color: var(--muted);
}
.add-shop-item input {
  width: 100%;
  margin-top: .25rem;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}

.danger { color: #b53a25; }
.quick-links {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ql {
  padding: .55rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-size: .9rem;
  transition: all .15s;
}
.ql:hover { border-color: var(--accent); background: var(--bg-soft); }

/* desktop max-width */
@media (min-width: 768px) {
  .container { max-width: 920px; }
}

/* ============================================================
   WEEK 4 — Dashboard, charts, planner, check-in, deload, PWA
   ============================================================ */

/* CHARTS */
.chart-card { padding: 1rem; }
.chart-card h2 {
  font-size: 1rem;
  margin: 0 0 .5rem;
  font-family: var(--font-display);
}
.chart-wrap {
  width: 100%;
  margin: .25rem 0 .5rem;
}
.chart-wrap.small { max-height: 150px; }
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
@media (min-width: 640px) {
  .charts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* TABS */
.tab-nav {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.tab-link {
  padding: .65rem 1rem;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: .9rem;
  white-space: nowrap;
  transition: all .15s;
}
.tab-link:hover { color: var(--text); }
.tab-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* HISTORY TABLE */
.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.hist-table th {
  text-align: left;
  padding: .5rem .35rem;
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  letter-spacing: .03em;
}
.hist-table td {
  padding: .5rem .35rem;
  border-bottom: 1px solid var(--border);
}
.cardio-table .btn-icon { width: 28px; height: 28px; font-size: 1.1rem; }

/* COMPARE PHOTOS */
.compare-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.compare-result {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .5rem;
  align-items: start;
  margin-top: 1rem;
}
.compare-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.cmp-head {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: .65rem;
  font-size: 1rem;
  text-align: center;
}
.cmp-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  margin-bottom: .65rem;
}
.cmp-photos img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.cmp-stats {
  font-size: .9rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cmp-stats > div { padding: .15rem 0; }
.compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent);
  padding-top: 4rem;
}
.diff {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-left: .35rem;
}
.diff.down { background: #e0e9d4; color: #4a6a26; }
.diff.up   { background: #fce4d6; color: #b04a18; }

@media (max-width: 600px) {
  .compare-result {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
  .compare-arrow { transform: rotate(90deg); padding: .25rem 0; font-size: 1.5rem; }
}

/* PHOTO GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
}
.photo-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.photo-cell img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .35rem .5rem;
  font-size: .8rem;
}

/* DASHBOARD */
.today-hero {
  padding: 1.25rem 1rem 1rem;
}
.th-row {
  display: flex;
  gap: .65rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}
.th-cell {
  flex: 1;
  min-width: 100px;
}
.th-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.th-of {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 400;
}
.th-lbl {
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: .15rem 0 .35rem;
}
.th-bar {
  height: 5px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}
.th-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.th-bar-fill.kcal { background: var(--accent); }
.th-bar-fill.p    { background: #6a8a52; }
.th-bar-fill.w    { background: #2c4a8c; }
.th-cta {
  display: block;
  text-align: center;
  margin-top: .5rem;
  padding: .55rem;
  background: var(--bg-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
  transition: background .15s;
}
.th-cta:hover { background: var(--border); }

.today-workout { padding: 1rem; }
.today-workout h2 { margin-top: 0; }
.tw-name { color: var(--muted); margin: 0 0 .65rem; }
.today-workout.rest-day { background: linear-gradient(to right, #f5faf5 0%, #fff 50%); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (min-width: 740px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
.widget { padding: 1rem; }
.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.widget-head h3 {
  margin: 0;
  font-size: .95rem;
  font-family: var(--font-display);
}

.streak-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: .5rem 0;
}
.streak-cell { flex: 1; text-align: center; }
.streak-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.streak-lbl {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .35rem;
}

.cmp-table { width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
.cmp-table td { padding: .35rem .25rem; }
.diff-cell { text-align: right; }

/* QUICK ACTIONS GRID */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  margin: 1rem 0;
}
@media (min-width: 600px) {
  .quick-actions-grid { grid-template-columns: repeat(4, 1fr); }
}
.qa-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: all .15s;
}
.qa-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,84,58,.08);
}
.qa-ico {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: .25rem;
  font-family: var(--font-display);
}
.qa-title {
  font-weight: 600;
  margin-bottom: .15rem;
}

/* DELOAD ALERT */
.alert.deload {
  background: linear-gradient(to right, #fff8e6, #fff5d8);
  border: 1px solid #f0d878;
  color: #6a4f0a;
  padding: .85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border-left: 4px solid #c4953f;
}

/* CHECK-IN PROMPT */
.checkin-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #fce4d6 0%, #f8e8d8 100%);
  border: 1px solid #f0c8b0;
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  gap: 1rem;
}

/* MEAL PLANNER */
.planner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}
@media (min-width: 700px) {
  .planner-grid { grid-template-columns: repeat(7, 1fr); gap: .35rem; }
}
.planner-day {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem;
  min-width: 0;
}
.pd-head {
  font-weight: 600;
  text-align: center;
  padding: .25rem 0 .5rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: .35rem;
}
.pd-slot {
  margin-bottom: .35rem;
  padding: .25rem;
  border-radius: 6px;
  background: var(--bg-soft);
  font-size: .75rem;
}
.pd-slot-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: .15rem;
}
.pd-meal-name { font-size: .8rem; }
.pd-slot-kcal {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
}
.pd-slot-items {
  list-style: none;
  padding: 0;
  margin: 0 0 .25rem;
}
.pd-slot-items li {
  padding: .15rem 0;
  font-size: .75rem;
  display: flex;
  justify-content: space-between;
  gap: .25rem;
}
.pd-slot-items a { color: var(--accent); text-decoration: none; }
.pd-x {
  width: 18px;
  height: 18px;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.pd-x:hover { color: #b53a25; }
.pd-add summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
  padding: .15rem;
}
.pd-add[open] summary { color: var(--accent); margin-bottom: .25rem; }
.pd-add-form {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.pd-add-form select,
.pd-add-form input {
  font-size: .75rem;
  padding: .25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  width: 100%;
}
.pd-add-form button { padding: .25rem; font-size: .75rem; }

.week-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  padding: .85rem 1rem;
}
.ws-label { font-size: .8rem; color: var(--muted); }
.ws-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.week-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* CHECK-IN */
.weekly-stats { padding: 1rem; }
.weekly-stats h2 {
  margin-top: 0;
  font-size: 1rem;
  font-family: var(--font-display);
}
.ws-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}
@media (min-width: 600px) {
  .ws-grid { grid-template-columns: repeat(5, 1fr); }
}
.ws-cell {
  text-align: center;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: .65rem .35rem;
}
.ws-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ws-lbl {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .25rem;
}

.checkin-form h3 {
  margin: 1.5rem 0 .65rem;
  font-size: 1rem;
  font-family: var(--font-display);
  border-bottom: 1px solid var(--border);
  padding-bottom: .25rem;
}
.checkin-form h3:first-child { margin-top: .5rem; }

.rating-grid {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem 0;
  flex-wrap: wrap;
}
.rating-lbl {
  flex: 1;
  font-size: .9rem;
  min-width: 140px;
}
.rating-stars {
  display: flex;
  gap: .25rem;
}
.rating-star {
  display: inline-block;
}
.rating-star input {
  position: absolute;
  opacity: 0;
}
.rating-star span {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all .15s;
}
.rating-star input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rating-star span:hover { border-color: var(--accent); }

.prev-plan {
  background: var(--bg-soft);
  padding: .65rem .85rem;
  border-radius: 8px;
  margin-top: .65rem;
}
.prev-plan p { margin: .25rem 0 0; font-size: .9rem; line-height: 1.4; }

.import-form {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.import-form input[type="file"] {
  flex: 1;
  min-width: 180px;
  padding: .5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
}

/* INFO ALERT */
.alert.ok {
  background: #e0e9d4;
  color: #4a6a26;
  border: 1px solid #c8d8b4;
  padding: .65rem .85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.alert.err {
  background: #fce4d6;
  color: #b04a18;
  border: 1px solid #f0c8b0;
  padding: .65rem .85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
