/* Coaching app – világos, minimalista felület sötét móddal. */
:root {
  /* B – Sötét prémium: fekete alap, lime kiemelés, karakteres számok. Csak sötét téma. */
  --bg: #0c0d0c;
  --surface: #161816;
  --surface-2: #1f221f;
  --text: #f2f3ef;
  --muted: #8b9089;
  --border: #242824;
  --border-strong: #333833;
  --accent: #c6f432;
  --accent-hover: #d6ff4a;
  --accent-soft: rgba(198, 244, 50, .13);
  --accent-text: #0c0d0c;
  --accent-grad: linear-gradient(90deg, #8bd12a, #c6f432);
  --ok: #c6f432; --ok-soft: rgba(198, 244, 50, .13);
  --warn: #ff9f43; --warn-soft: rgba(255, 159, 67, .14);
  --err: #ff5d5d; --err-soft: rgba(255, 93, 93, .14);
  --up: #ff9f43; --down: #c6f432;
  --shadow: none;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 240px;
  --font: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --head: "Space Grotesk", Manrope, sans-serif;
  --num: "Space Grotesk", Manrope, sans-serif;
  /* közepes animációk */
  --ease: cubic-bezier(.2, .9, .2, 1);
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--head); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 22px; } h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; } h4 { font-size: 13px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); }
.mt { margin-top: 18px; }
.pad { padding: 14px 16px; }
.ic { flex: none; }
code { font: 500 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- űrlapelemek ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 40px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.field.grow { flex: 1; }
.form-error { color: var(--err); font-size: 13.5px; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  height: 40px; padding: 0 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn-danger:hover { background: var(--err-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn-row.tight { gap: 2px; margin: 0; flex-wrap: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 0;
  background: transparent; color: var(--muted); cursor: pointer; position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled, .icon-btn.disabled { opacity: .3; pointer-events: none; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; font-size: 14px; margin-top: 12px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg-sm button { padding: 4px 9px; font-size: 12.5px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.pill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.pill.muted { color: var(--muted); }
.phase-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: none; }
.delta { font-size: 12.5px; font-weight: 600; margin-left: 4px; }
.delta.down { color: var(--down); } .delta.up { color: var(--up); }

/* ---------- csúszka ---------- */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--surface-2); }
.range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-2); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.unset .range::-webkit-slider-thumb { background: var(--border-strong); }
.unset .range::-moz-range-thumb { background: var(--border-strong); }

/* ---------- belépés ---------- */
.center-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-brand h1 { font-size: 22px; }
.logo-dot { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); position: relative; flex: none; }
.logo-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2.5px solid var(--accent-text); }
.login-foot { display: flex; justify-content: center; }
.demo-note { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; line-height: 1.7; }

/* ---------- keret ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  border-right: 1px solid var(--border); background: var(--surface); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16.5px; padding: 4px 10px 20px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); }
.side-foot { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.me { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.me b { display: block; font-size: 14px; } .me small { color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar h1 { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.bell .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); border: 2px solid var(--bg); }
.view { padding: 8px 28px 48px; max-width: 1180px; width: 100%; }
.view > div { display: flex; flex-direction: column; gap: 16px; }
.loading { display: grid; place-items: center; padding: 80px 0; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.bottom-nav, .sidebar-backdrop { display: none; }

/* frissítések ablak */
.updates-pop { position: absolute; right: 20px; top: 58px; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--border); }
.pop-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.pop-list a { display: flex; flex-direction: column; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 14px; }
.pop-list a:hover { background: var(--surface-2); }
.pop-list li.unseen a { background: var(--accent-soft); }
.pop-list li.unseen a + a { margin-top: 2px; }
.pop-list small { color: var(--muted); }
.pop-foot { padding: 10px; border-top: 1px solid var(--border); }

/* ---------- kártyák, elrendezés ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin-right: auto; }
.sub-h { margin: 18px 0 8px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.section-h { margin: 12px 0 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.stack-form > .btn { align-self: flex-start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar .hint { margin: 0; max-width: 620px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select { width: auto; }
.search { position: relative; display: flex; align-items: center; min-width: 220px; }
.search .ic { position: absolute; left: 11px; color: var(--muted); }
.search input { padding-left: 34px !important; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state p { max-width: 420px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.banner span { flex: 1; }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.danger-zone { border-color: color-mix(in srgb, var(--err) 25%, var(--border)); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile b { font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .phase-dot { position: absolute; }
.tile:has(.phase-dot) { position: relative; }
.tile:has(.phase-dot) small { padding-left: 14px; }
.tile .phase-dot { top: 21px; left: 16px; }
.tile .muted { font-size: 13px; }
.tiles-sm { grid-template-columns: repeat(4, 1fr); }
.tiles-sm .tile { background: var(--surface-2); border: 0; box-shadow: none; }
.tiles-sm b { font-size: 16px; }
.hello h2 { font-size: 24px; }
.today-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.today-stats > div { display: flex; flex-direction: column; min-width: 0; }
.today-stats small { color: var(--muted); font-size: 12.5px; }
.today-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.today-stats .muted { font-size: 13px; }

/* ---------- táblázatok ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { margin: 0 -20px; padding: 0 20px; }
.card.flush > .table-wrap { margin: 0; padding: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tfoot th { border-top: 1px solid var(--border); border-bottom: 0; color: var(--text); font-weight: 600; }
.card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 20px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-click tbody tr { cursor: pointer; }
.tbl-click tbody tr:hover { background: var(--surface-2); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.input-xs { width: 72px !important; min-height: 32px !important; padding: 4px 8px !important; text-align: right; }

/* ---------- journal ---------- */
.date-nav { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; flex-wrap: wrap; box-shadow: var(--shadow); }
.date-mid { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: center; }
.date-mid b { font-size: 16px; text-transform: capitalize; }
.date-mid small { color: var(--muted); }
.date-actions { display: flex; align-items: center; gap: 8px; }
.date-pick { width: 150px !important; min-height: 34px !important; padding: 4px 8px !important; }
.save-status { font-size: 12.5px; min-width: 56px; text-align: right; }
.journal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; user-select: none; transition: background .15s; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .box, .cl-row .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; background: var(--surface); transition: all .15s; }
.check-row.on { background: var(--accent-soft); }
.check-row.on .box { background: var(--accent); border-color: var(--accent); color: var(--accent-text); animation: popin .3s var(--pop); }
.check-row.on .lbl { color: var(--muted); }
.check-row .lbl { display: flex; flex-direction: column; line-height: 1.3; }
.check-row .lbl small { color: var(--muted); }
.check-row:has(input:focus-visible) { outline: 2px solid var(--accent); }

.weight-ctl { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 6px; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.round-btn:hover { background: var(--surface-2); }
.round-btn:active { transform: scale(.95); }
.weight-val { display: flex; align-items: baseline; gap: 6px; }
.weight-val input { width: 124px !important; font-size: 34px; font-weight: 600; text-align: center; border: 0 !important; background: transparent !important; padding: 0 !important; box-shadow: none !important; font-variant-numeric: tabular-nums; }
.weight-val span { color: var(--muted); font-weight: 500; }
.weight-ctl.unset .weight-val input { color: var(--muted); }
.weight-ctl.unset .weight-val input::placeholder { color: var(--muted); opacity: .7; }
.weight-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.slider-row { padding: 6px 0 2px; }
.slider-row + .slider-row { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; }
.slider-val { font-size: 20px; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.slider-row.unset .slider-val { color: var(--muted); }
.slider-scale { display: flex; justify-content: space-between; color: var(--muted); margin-top: -4px; }
.sleep-row { border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 4px; }
.sleep-row .slider-top span { display: inline-flex; align-items: center; gap: 6px; }

.input-lg { font-size: 22px !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--accent-grad); border-radius: 99px; transition: width .6s var(--ease); }
.progress.over i { background: var(--warn); }
.mini-list { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }
.cardio-row { display: grid; grid-template-columns: minmax(130px, 1fr) 1.4fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.cardio-min { display: flex; align-items: center; gap: 10px; }
.cardio-min b { white-space: nowrap; min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }

.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.macro-top { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.macro-top span { color: var(--muted); }
.macro-top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.macro .progress { margin-top: 6px; }
.food-tbl td { padding: 6px 10px; }
.add-food { margin-top: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 0 14px; }
.add-food summary { cursor: pointer; padding: 11px 0; font-weight: 500; display: flex; align-items: center; gap: 6px; list-style: none; color: var(--accent); }
.add-food summary::-webkit-details-marker { display: none; }
.add-food[open] { padding-bottom: 14px; }
.grid-food { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 12px; }
.grid-food .span2 { grid-column: span 2; }

/* ---------- grafikonok ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-lbl { fill: var(--muted); font-size: 11px; font-family: inherit; }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: var(--accent); opacity: .1; }
.ch-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.ch-dot:hover { r: 5; }
.ch-bar { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.ch-bar.hit { fill: var(--accent); }
.ch-target { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-empty { color: var(--muted); text-align: center; padding: 50px 0; font-size: 14px; }
.compare-pick { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.compare-pick select { flex: 1; }
.compare-pick span { color: var(--muted); }
.compare-tbl th { width: 34%; }
.compare-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

/* ---------- képek ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid img, .photo-grid .ph img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); display: block; background: var(--surface-2); }
.zoomable { cursor: zoom-in; }
.ph { position: relative; }
.ph-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 50%; }
.ph-del:hover { background: rgba(0, 0, 0, .75); color: #fff; }
.photo-add { align-self: flex-start; cursor: pointer; margin-top: 4px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 96vw; max-height: 92vh; display: block; border-radius: 10px; cursor: zoom-out; }

/* ---------- check-in ---------- */
.checkin-card { padding: 0; }
.checkin-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.checkin-card summary::-webkit-details-marker { display: none; }
.ci-sum { display: flex; flex-direction: column; }
.ci-stats { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.ci-stats span { display: inline-flex; align-items: center; gap: 5px; }
.ci-body { padding: 0 20px 20px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.answers { margin: 0; display: grid; gap: 12px; }
.answers dt { font-size: 13px; color: var(--muted); }
.answers dd { margin: 2px 0 0; white-space: pre-wrap; }
.coach-note { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.coach-note .sub-h { margin-top: 0; }

/* ---------- coach: kliensek ---------- */
.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.client-card { display: flex; flex-direction: column; gap: 12px; transition: border-color .15s; }
.client-card:hover { border-color: var(--border-strong); }
.cc-head { display: flex; align-items: center; gap: 10px; }
.cc-head > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-phase { font-size: 14px; font-weight: 500; }
.cc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cc-stats > div { display: flex; flex-direction: column; min-width: 0; }
.cc-stats small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.cc-stats b { font-size: 16px; }
.cc-stats .muted { font-size: 12px; }
.cc-foot { font-size: 13px; color: var(--warn); display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.cred-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.cred-box > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cred-box code { background: none; padding: 0; font-size: 17px; }
.client-head { display: flex; align-items: center; gap: 12px; }
.ch-text { display: flex; flex-direction: column; min-width: 0; }
.ch-text b { font-size: 17px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; margin: 0 -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 10px 12px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
#tab { display: flex; flex-direction: column; gap: 16px; }

/* ---------- szerkesztők ---------- */
.save-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow-lg); }
.macro-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.macro-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.macro-tiles > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.macro-tiles small { color: var(--muted); }
.macro-tiles b { font-size: 18px; }
.meal-edit { display: flex; flex-direction: column; gap: 10px; }
.meal-row { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); }
.meal-row-head { display: flex; align-items: center; gap: 10px; }
.meal-no { font-weight: 600; white-space: nowrap; }
.meal-row-head .meal-name { flex: 1; }
.meal-target-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meal-target-row label { display: flex; align-items: center; gap: 4px; }
.meal-target-row label small { color: var(--muted); font-weight: 600; }
.meal-target-row input { width: 76px !important; }
.meal-kcal { margin-left: auto; }
.ex-items { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; }
.ex-items-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.btn-row.tight-top { margin-top: 8px; }
.ex-list { display: flex; flex-direction: column; margin-top: 8px; }
.ex-line { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.ex-line b { font-variant-numeric: tabular-nums; }
.ex-line small { grid-column: 1 / -1; }
.ex-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }

/* élelmiszer-kereső */
.fp-search { display: flex; flex-direction: column; gap: 8px; }
.fp-results { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fp-results:empty { display: none; }
.fp-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.fp-item:last-child { border-bottom: 0; }
.fp-item:hover, .fp-item:focus-visible { background: var(--accent-soft); outline: none; }
.fp-name { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fp-new-btn { align-self: flex-start; color: var(--accent); }
.fp-new, .fp-picked { display: flex; flex-direction: column; gap: 12px; }
.fp-new[hidden], .fp-picked[hidden], .fp-search[hidden] { display: none; }
.fp-sel { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.fp-preview { font-size: 14px; min-height: 20px; }
.meal-sum { margin-top: 8px; }
.meal-list { display: flex; flex-direction: column; gap: 8px; }
.meal { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.meal-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.meal-top .muted { font-size: 13px; }
.meal-ex { font-size: 14px; margin-top: 4px; white-space: pre-wrap; }

.day-name { font-weight: 600; font-size: 15.5px; max-width: 340px; flex: 1; }
.ex-edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ex-row { display: grid; grid-template-columns: minmax(180px, 2.2fr) 64px 84px 84px minmax(100px, 1.4fr) auto; gap: 8px; align-items: center; }
.ex-head { font-size: 12px; color: var(--muted); font-weight: 500; }
.ex-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.supp-edit, .cl-edit, .q-edit { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.supp-row { display: grid; grid-template-columns: 2fr 100px 90px 1.4fr auto; gap: 8px; align-items: center; }
.cl-row { display: flex; align-items: center; gap: 10px; }
.q-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.supp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.supp-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.supp-list li:last-child { border-bottom: 0; }
.supp-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.supp-amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.supp-list small { flex-basis: 100%; padding-left: 44px; margin-top: -6px; }
.phase-card.active { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.phase-card .card-head { margin-bottom: 6px; }
.plan-card { padding: 0; }
.plan-card summary { display: flex; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.plan-card summary::-webkit-details-marker { display: none; }
.plan-days { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.plan-body { padding: 0 16px 16px; }
.plan-body .card { box-shadow: none; background: var(--surface-2); border: 0; }
.disabled-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; }
.coach-box { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 2px; }

/* ---------- receptek ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.recipe-card { display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.recipe-card:hover { border-color: var(--border-strong); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ing-row { display: grid; grid-template-columns: 2fr repeat(5, 1fr) 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ing-head { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }


/* ---------- étkezés összesítő a journalban ---------- */
.food-summary { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); color: var(--muted); }
.food-summary:hover { border-color: var(--border-strong); }
.fs-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.fs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fs-top { display: flex; justify-content: space-between; gap: 8px; color: var(--text); }
.fs-top span { font-weight: 600; font-variant-numeric: tabular-nums; }
.fs-main .progress { margin-top: 0; }

/* ---------- meal-ek (étkezés) ---------- */
.sub-h.first { margin-top: 0; }
.meal-cards { display: flex; flex-direction: column; gap: 10px; }
.meal-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.meal-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.meal-card-head b { font-size: 15px; }
.meal-targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mt-cell { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.mt-cell small { color: var(--muted); font-weight: 600; width: 100%; font-size: 11px; }
.mt-cell b { font-size: 15px; }
.mt-cell span { color: var(--muted); font-size: 12.5px; }
.mt-cell.hit { background: var(--ok-soft); } .mt-cell.hit b { color: var(--ok); }
.mt-cell.over { background: var(--warn-soft); } .mt-cell.over b { color: var(--warn); }
.food-list { display: flex; flex-direction: column; }
.food-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.fname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fgrams { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.meal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.field-row.four { grid-template-columns: repeat(4, 1fr); }
.meal.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* ---------- kérdőív-szerkesztő ---------- */
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-card { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.q-main { display: grid; grid-template-columns: 1fr 200px; gap: 10px; }
.q-title { font-weight: 600; background: var(--surface-2) !important; border-color: transparent !important; }
.q-title:focus { border-color: var(--accent) !important; }
.q-help { font-size: 13.5px; border-style: dashed !important; min-height: 34px !important; }
.q-sample { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px dotted var(--border-strong); max-width: 340px; }
.q-options { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.q-opt { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 460px; }
.q-mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; }
.q-mark.sq { border-radius: 4px; }
.q-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 8px; gap: 8px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 34px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- kérdőív kitöltése ---------- */
.fq { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.fq:first-child { padding-top: 0; }
.fq-head { display: flex; flex-direction: column; gap: 2px; }
.fq-head b { font-weight: 600; }
.req { color: var(--err); }
.fq-opts { display: flex; flex-direction: column; gap: 4px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.opt:hover { background: var(--surface-2); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.fq-err { color: var(--err); }
.fq.invalid .fq-head b { color: var(--err); }
.fq .slider-row { padding-top: 0; }


/* ---------- edzés (kliens) ---------- */
.plan-ex { list-style: none; margin: 0; padding: 0; }
.plan-ex li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); color: var(--muted); }
.plan-ex li a > div { display: flex; flex-direction: column; color: var(--text); }
.plan-ex li a:hover b { color: var(--accent); }
.wo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 64px; z-index: 6; }
.wo-head > div:first-child { display: flex; flex-direction: column; }
.wo-timer { font-size: 24px; font-variant-numeric: tabular-nums; }
.wx-target { font-size: 13.5px; margin: -6px 0 10px; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 58px 44px; gap: 8px; align-items: center; }
.set-ctl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.set-ctl .set-in { flex: 1; min-width: 0; }
.drag-num { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.drag-num b { font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.drag-num .dn-arrow { color: var(--muted); opacity: .45; line-height: 0; }
.drag-num .dn-unit { font-style: normal; font-size: 10.5px; color: var(--muted); line-height: 1.2; margin-bottom: 2px; }
.drag-num.faded b { color: var(--muted); }
.drag-num.dragging, .drag-num:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.drag-num.dragging .dn-arrow { opacity: 1; color: var(--accent); }
.set-row.done .drag-num { background: transparent; border-color: transparent; }
.set-row { padding: 5px 4px; border-radius: 8px; }
.set-row + .set-row { margin-top: 2px; }
.set-row.done { background: var(--ok-soft); }
.set-no { font-weight: 600; display: flex; align-items: baseline; gap: 3px; }
.set-no small { color: var(--muted); font-size: 11px; }
.set-in { min-height: 60px !important; font-size: 18px; padding: 6px 8px !important; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.set-in::placeholder { color: var(--muted); opacity: .55; font-weight: 500; }
.set-row.done .set-in { background: transparent; border-color: transparent; }
.set-delta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.rep-delta { font-weight: 700; font-size: 13px; padding: 1px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.rep-delta.up { color: var(--ok); background: var(--ok-soft); }
.rep-delta.down { color: var(--err); background: var(--err-soft); }
.rep-delta.same { color: var(--muted); }
.w-delta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.set-check { width: 40px; height: 38px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.set-row.done .set-check { background: var(--ok); border-color: var(--ok); color: var(--accent-text); animation: popin .35s var(--pop); }
.wx-note { margin-top: 10px; min-height: 38px !important; font-size: 14px; }
.rest-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 60; width: min(520px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-lg); }
.rest-bar[hidden] { display: none; }
.rest-info { display: flex; flex-direction: column; line-height: 1.1; }
.rest-info small { color: var(--muted); }
.rest-info b { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 58px; }
.rest-progress { flex: 1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.rest-progress i { display: block; height: 100%; background: var(--accent-grad); width: 0; transition: width .4s linear; }
.pr-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.pr-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ok); }
.pr-list li b { color: var(--text); }
.workout-card { padding: 0; }
.workout-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.workout-card summary::-webkit-details-marker { display: none; }
.wl-ex { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.delta.good { color: var(--ok); } .delta.bad { color: var(--err); }

/* ---------- modal, toast ---------- */
.modal { border: 0; padding: 0; border-radius: 16px; width: min(480px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(860px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
.modal form { display: flex; flex-direction: column; max-height: 90vh; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 6px 20px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .2s ease-out; max-width: 90vw; white-space: pre-wrap; }
.toast.ok { background: var(--accent); color: var(--accent-text); }
.toast.err { background: var(--err); color: #fff; }
.toast:not(.ok):not(.err) { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
.toast.out { opacity: 0; transition: opacity .4s; }

/* ---------- mobil ---------- */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .journal-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .macro-inputs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .sidebar { position: fixed; z-index: 100; left: 0; top: 0; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); width: 260px; }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .35); }
  .topbar { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar h1 { font-size: 18px; }
  .view { padding: 4px 16px calc(88px + env(safe-area-inset-bottom)); }
  .updates-pop { right: 16px; top: 54px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--muted); background: none; border: 0; font-weight: 500; min-width: 0; }
  .bottom-nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .bottom-nav a.on { color: var(--accent); }
  .card { padding: 16px; }
  .card > .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .tiles, .tiles-sm { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile b { font-size: 17px; }
  .macros, .today-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-food { grid-template-columns: repeat(2, 1fr); }
  .grid-food .span2 { grid-column: span 2; }
  .date-nav { padding: 6px; }
  .date-actions { width: 100%; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 6px; }
  .date-pick { flex: 1; width: auto !important; }
  .cardio-row { grid-template-columns: 1fr auto; }
  .cardio-row .cardio-min { grid-column: 1 / -1; grid-row: 2; }
  .cc-stats { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
  .compare-photos { grid-template-columns: 1fr 1fr; gap: 8px; }
  .compare-pick { flex-direction: column; align-items: stretch; }
  .compare-pick > span { display: none; }
  .meal-target-row input { width: 64px !important; }
  .meal-kcal { margin-left: 0; }
  .ex-row { grid-template-columns: 1fr 1fr 1fr; padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
  .ex-row .ex-name { grid-column: 1 / -1; }
  .ex-row [data-xfield="notes"] { grid-column: 1 / 3; }
  .ex-head { display: none; }
  .supp-row { grid-template-columns: 1fr 1fr auto; padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
  .supp-row [data-sfield="name"], .supp-row [data-sfield="timing"] { grid-column: 1 / -1; }
  .supp-row [data-sfield="timing"] { grid-row: 3; }
  .ing-row { grid-template-columns: repeat(5, 1fr) 36px; }
  .ing-row [data-f="name"] { grid-column: 1 / -1; }
  .ing-head { display: none; }
  .q-main { grid-template-columns: 1fr; }
  .meal-targets { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .mt-cell { padding: 5px 6px; }
  .mt-cell b { font-size: 14px; }
  .field-row.four { grid-template-columns: repeat(2, 1fr); }
  .save-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .search { min-width: 0; flex: 1; }
  .toolbar > .btn { flex: none; }
  .cred-box { grid-template-columns: 1fr; }
  .topbar .lang-switch { display: none; }
  .set-row { grid-template-columns: 28px 1fr 1fr 44px 40px; gap: 5px; }
  .wo-head { top: 56px; }
  .rest-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}


/* ================================================ B – Sötét prémium: számok, kiemelések, animációk */
/* Karakteres számok (Space Grotesk) mindenhol, ahol érték jelenik meg. */
.tile b, .today-stats b, .cc-stats b, .macro-tiles b, .macro-top b, .slider-val, .weight-val input, .input-lg, .drag-num b,
.wo-timer, .rest-info b, .mt-cell b, .cred-box code, .ch-text b, .delta, .rep-delta, .fs-top span, .meal-kcal, .val { font-family: var(--num); letter-spacing: -.02em; }
.topbar h1, .hello h2, .brand span, .login-brand h1 { font-family: var(--head); letter-spacing: -.03em; }
.logo-dot { background: var(--accent); border-radius: 9px; }
.logo-dot::after { border-color: var(--accent-text); }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tile { position: relative; overflow: hidden; }
.card, .tile, .date-nav, .food-summary { border-color: var(--border); }
input:not([type=checkbox]):not([type=range]):not([type=file]), select, textarea { background: var(--surface-2); border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { background: var(--surface); }
.seg { background: var(--surface-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.range::-webkit-slider-runnable-track { height: 8px; background: var(--surface-2); }
.range::-moz-range-track { height: 8px; background: var(--surface-2); }
.range::-webkit-slider-thumb { margin-top: -8px; background: var(--accent); border-color: var(--surface); }
.range::-moz-range-thumb { background: var(--accent); border-color: var(--surface); }
.banner { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(198, 244, 50, .25); }
.center-screen { background: radial-gradient(60% 50% at 50% 0%, rgba(198, 244, 50, .10), transparent 70%); }
.login-card { background: color-mix(in srgb, var(--surface) 92%, transparent); }
.bell .dot { background: var(--accent); border-color: var(--bg); }
.toast.ok { color: var(--accent-text); font-weight: 700; }

/* ---- közepes animációk ---- */
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* oldalváltáskor a kártyák lépcsőzetesen beúsznak */
.view > div > .card, .view > div > .tiles > .tile, .view > div > section, .view > div > .stack > .card, .view > div > .journal-grid > .card,
.view > div > .client-cards > .card, .view > div > .recipe-grid > .card, #tab > .card, #tab > .stack > .card, #tab > section {
  animation: rise .5s var(--ease) both;
}
.view > div > :nth-child(2), .tiles > .tile:nth-child(2), .journal-grid > .card:nth-child(2), .client-cards > .card:nth-child(2), .stack > .card:nth-child(2) { animation-delay: .05s; }
.view > div > :nth-child(3), .tiles > .tile:nth-child(3), .journal-grid > .card:nth-child(3), .client-cards > .card:nth-child(3), .stack > .card:nth-child(3) { animation-delay: .1s; }
.view > div > :nth-child(4), .tiles > .tile:nth-child(4), .journal-grid > .card:nth-child(4), .client-cards > .card:nth-child(4), .stack > .card:nth-child(4) { animation-delay: .15s; }
.view > div > :nth-child(n+5), .journal-grid > .card:nth-child(n+5), .client-cards > .card:nth-child(n+5), .stack > .card:nth-child(n+5) { animation-delay: .2s; }
/* csíkok feltöltődnek */
.progress i, .rest-progress i { transform-origin: left; }
.view .progress i { animation: growx .8s var(--ease) .15s both; }
.ch-line { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.2s var(--ease) .1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ch-bar { transform-box: fill-box; transform-origin: bottom; animation: growy .7s var(--ease) both; }
@keyframes growy { from { transform: scaleY(0); } }
.drag-num.dragging b { transform: scale(1.08); transition: transform .15s var(--ease); }
.btn { transition: background .15s, border-color .15s, transform .12s var(--ease), opacity .15s; }
.btn:active, .icon-btn:active, .set-check:active, .round-btn:active { transform: scale(.95); }
.modal[open] { animation: rise .3s var(--ease); }
.check-row { transition: background .2s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .ch-line { stroke-dashoffset: 0; }
}
@keyframes popin { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.set-row.done .rep-delta { animation: popin .35s var(--pop); }

/* kardió heti cél (journal) és felosztás-előnézet (coach) */
.cardio-goal { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.cardio-goal .progress { margin-top: 6px; }
.cardio-goal .progress.done i { background: var(--accent); }
.cardio-reco { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 14px; }
.cardio-goal .muted { margin-top: 4px; }
.cardio-split-preview { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; margin: 4px 0 12px; }
