/* Fitness sloj (Whoop / Apple Fitness smjer): crno, velike brojke, prstenovi, slike */
:root {
  --bg: #000;
  --surface: #101012;
  --surface-2: #17171a;
  --surface-3: #1f1f23;
  --border: #1c1c20;
  --border-2: #2a2a30;
  --kcal: #d7f23c;      /* limeta — kalorije, glavni */
  --prot: #3ee0cf;      /* tirkiz — protein */
  --move: #ff7a45;      /* narančasta — trening */
  --r-lg: 22px;
}
body { background: #000; }
.app { padding-bottom: calc(110px + var(--safe-b)); }
.topbar { background: rgba(0,0,0,.78); }

/* velika tipografija */
.display { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.display-sm { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.unit { font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-left: 3px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.c-kcal { color: var(--kcal); } .c-prot { color: var(--prot); } .c-move { color: var(--move); }

/* kartice */
.card { border-radius: var(--r-lg); border-color: var(--border); }
.tile { background: var(--surface); border-radius: var(--r-lg); padding: 18px; position: relative; overflow: hidden; }

/* prstenovi */
.rings-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; background: var(--surface); border-radius: 26px; padding: 18px; }
.rings-card .legend { display: flex; flex-direction: column; gap: 12px; }
.rings-card .lg .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rings-card .lg .val { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rings-card .lg .val small { font-size: 13px; color: var(--text-3); font-weight: 600; }
.ring-track { opacity: .18; }
.ring-arc { transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }

/* hero trening */
.hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 300px; background: #111 center/cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.92) 100%); }
.hero > * { position: relative; }
.hero .in { padding: 20px; }
.hero .chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); font-size: 12px; font-weight: 700; }
.hero h2 { font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 4px; }
.btn.go { height: 54px; border-radius: 16px; font-size: 16px; font-weight: 800; background: var(--kcal); color: #000; }
.btn.go.move { background: var(--move); color: #000; }
.hero.rest { min-height: 180px; background: linear-gradient(135deg, #15151a, #0b0b0d); }

/* horizontalni obroci */
.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.meal-card { flex: none; width: 74%; max-width: 300px; scroll-snap-align: start; border-radius: 22px; padding: 16px; min-height: 172px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; position: relative; overflow: hidden; color: #fff; }
.meal-card .top { display: flex; justify-content: space-between; align-items: center; }
.meal-card .name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 18px; }
.meal-card .macro { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; font-weight: 700; }
.meal-card .macro span { opacity: .85; }
.meal-card .eat { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-items: center; flex: none; }
.meal-card.done .eat { background: #fff; color: #000; border-color: #fff; }
.meal-card.done { opacity: .55; }
.meal-card .deco { position: absolute; right: -24px; bottom: -24px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.08); }
.g-dorucak { background: linear-gradient(140deg, #3a2b05, #6b4b07 60%, #8a6110); }
.g-rucak { background: linear-gradient(140deg, #0e2f22, #145c3f 60%, #1a7a52); }
.g-uzina { background: linear-gradient(140deg, #13253d, #1d4471 60%, #2a5e9a); }
.g-vecera { background: linear-gradient(140deg, #2a1440, #4b2471 60%, #643099); }
.g-slatko { background: linear-gradient(140deg, #3d1328, #6e2148 60%, #93305f); }

/* vježbe s fotkama */
.ex-row { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; width: 100%; text-align: left; }
.ex-row:active { background: var(--surface-2); }
.ex-thumb { width: 66px; height: 66px; border-radius: 14px; background: var(--surface-3) center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--text-3); position: relative; }
.ex-thumb .n { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; border-radius: 6px; background: rgba(0,0,0,.65); font-size: 11px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.ex-row .dose { font-size: 17px; font-weight: 800; color: var(--kcal); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* tjedni */
.weekstrip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.weekstrip::-webkit-scrollbar { display: none; }
.wk { flex: none; width: 54px; height: 64px; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.wk b { font-size: 20px; color: var(--text); letter-spacing: -.02em; }
.wk.on { background: var(--kcal); color: rgba(0,0,0,.55); }
.wk.on b { color: #000; }
.wk.locked b { color: var(--text-3); }
.wk.done:not(.on) { box-shadow: inset 0 0 0 1.5px rgba(215,242,60,.5); }

/* plutajuća navigacija */
.tabbar { background: transparent; border: 0; padding: 0 14px calc(12px + var(--safe-b)); backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
.tabbar .in { max-width: 420px; background: rgba(28,28,32,.86); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.6); pointer-events: auto; }
.tabbar button { border-radius: 18px; padding: 8px 0 7px; font-size: 10.5px; }
.tabbar button.on { background: rgba(255,255,255,.08); }

/* trening mod (cijeli ekran) */
.wo { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; flex-direction: column; }
.wo .media { position: relative; flex: 0 0 46vh; background: #0b0b0d center/cover no-repeat; }
.wo .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.wo .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 30%, transparent 60%, #000); pointer-events: none; }
.wo .bar { position: absolute; top: calc(10px + env(safe-area-inset-top,0px)); left: 12px; right: 12px; z-index: 2; display: flex; gap: 4px; }
.wo .bar i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); }
.wo .bar i.on { background: #fff; }
.wo .x { position: absolute; top: calc(22px + env(safe-area-inset-top,0px)); right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff; }
.wo .body { flex: 1; padding: 16px 20px calc(20px + var(--safe-b)); display: flex; flex-direction: column; max-width: 600px; width: 100%; margin: 0 auto; overflow-y: auto; }
.wo .big { font-size: 64px; font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--kcal); font-variant-numeric: tabular-nums; }
.wo .sets { display: flex; gap: 8px; }
.wo .sets i { width: 34px; height: 8px; border-radius: 8px; background: var(--surface-3); }
.wo .sets i.on { background: var(--kcal); }
.wo .foot { margin-top: auto; display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding-top: 16px; }
.timer { display: grid; place-items: center; margin: 10px auto; position: relative; }
.timer .t { position: absolute; font-size: 54px; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.confetti { font-size: 72px; text-align: center; }

/* onboarding opcije veće */
.opt { padding: 16px; border-radius: 18px; background: var(--surface); border-color: var(--border-2); }
.opt.on { background: rgba(215,242,60,.08); }
.input { background: var(--surface); border-radius: 14px; height: 50px; }
textarea.input { border-radius: 14px; }
.btn { border-radius: 14px; }
.stat { border-radius: 20px; background: var(--surface); border-color: transparent; }
.card { background: var(--surface); }
.sheet { background: #111114; }

.hero.rest { min-height: 0; }
/* trener */
.c-side { background: #050506; }
.c-main .topbar { background: rgba(0,0,0,.8); }
.clirow { border-radius: 18px; }
.clirow.on, .clirow:hover { background: var(--surface); border-color: transparent; }
.avring { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.avring svg { position: absolute; inset: 0; }
.avring span { font-size: 13px; font-weight: 800; color: var(--text-2); }
.kpi { background: var(--surface); border-radius: 22px; padding: 18px; }
.kpi .v { font-size: 34px; font-weight: 900; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--text-3); margin-top: 6px; font-weight: 600; }
.tabbar.coach .in { max-width: 360px; }
@media (min-width: 1000px) { .tabbar.coach { display: none; } }

svg[aria-label="Graf težine"] { max-height: 300px; }

a.btn { text-decoration: none; }
.login-hero { height: 58vh; min-height: 380px; background: #111 url('/img/hero.jpg') center 30%/cover no-repeat; position: relative; padding: calc(16px + env(safe-area-inset-top,0px)) 20px; }
.login-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.3) 60%, #000 100%); }
.av.img { background: #222 center/cover no-repeat; border: 0; }
@media (min-width: 900px) { .login-hero { height: 46vh; } }

.wo .media.empty { flex-basis: 30vh; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #1d2410, #000 70%); }
.wo .media.empty .ph { text-align: center; color: var(--kcal); position: relative; z-index: 1; }
.wo .media.empty .ph svg { width: 44px; height: 44px; }
.wo .media.empty::after { display: none; }
.login-hero { background-position: center 35%; }
@media (min-width: 700px) { .login-hero { background-image: url('/img/hero-wide.jpg'); background-position: center 40%; } }
