/* ============ Kanka Fitness — tasarım sistemi ============ */
@font-face { font-family: 'Jakarta'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/jakarta-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jakarta'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/jakarta-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0a0b0e;
  --s1: #13151a;          /* yüzey */
  --s2: #1b1e25;          /* yükseltilmiş */
  --s3: #252933;          /* input / chip */
  --line: rgba(255,255,255,.07);
  --text: #f4f5f7;
  --t2: #a3a9b7;          /* ikincil metin (kontrast ≥ 4.5) */
  --t3: #6b7282;
  --lime: #d4ff3a;
  --lime-d: #b8e62a;
  --ok: #34d399;
  --warn: #fb923c;
  --bad: #f87171;
  --r-lg: 24px; --r: 18px; --r-sm: 12px;
  --shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  --ease: cubic-bezier(.2,.8,.2,1);
  --safe-b: env(safe-area-inset-bottom);
  --safe-t: env(safe-area-inset-top);
  /* gün renkleri */
  --d1a: #ff7a45; --d1b: #ff3d71;
  --d2a: #3b82f6; --d2b: #22d3ee;
  --d3a: #8b5cf6; --d3b: #e879f9;
  --d4a: #10b981; --d4b: #a3e635;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 'Jakarta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
main { max-width: 560px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 18px calc(118px + var(--safe-b)); animation: pageIn .35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 800; margin: 8px 0 18px; }
h2 { font-size: 19px; font-weight: 800; margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 700; margin: 0; }
a { color: var(--lime); text-decoration: none; }
.hidden { display: none !important; }
.t2 { color: var(--t2); } .t3 { color: var(--t3); }
.sm { font-size: 14px; } .xs { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.s { width: 16px; height: 16px; } .ico.l { width: 24px; height: 24px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; }
.sec-h h2 { margin: 0; } .sec-h a { font-size: 14px; font-weight: 600; }

/* ---------- kart ---------- */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; }
.card.tight { padding: 14px; }
.tile { background: var(--s2); border-radius: var(--r); padding: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 12px; }
.stat .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--t2); }

/* ---------- buton ---------- */
button, .btn { appearance: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; border-radius: 16px; padding: 14px 18px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); background: var(--s3); transition: transform .12s var(--ease), background .2s, opacity .2s; text-decoration: none; }
button:active, .btn:active { transform: scale(.97); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.btn-p { background: var(--lime); color: #0a0b0e; box-shadow: 0 8px 24px -8px rgba(212,255,58,.55); }
.btn-p:active { background: var(--lime-d); }
.btn-g { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-d { background: rgba(248,113,113,.1); color: var(--bad); }
.btn-w { background: #fff; color: #0a0b0e; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; background: var(--s2); }
button:disabled { opacity: .4; }

/* ---------- form ---------- */
input, select, textarea { width: 100%; background: var(--s2); color: var(--text); border: 1.5px solid transparent; border-radius: 14px; padding: 13px 14px; font: inherit; font-size: 16px; transition: border-color .15s; }
input::placeholder { color: var(--t3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); background: var(--s3); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a9b7' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--t2); margin: 14px 0 6px; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- chip / pill ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--s3); color: var(--t2); white-space: nowrap; }
.pill.lime { background: rgba(212,255,58,.12); color: var(--lime); }
.pill.ok { background: rgba(52,211,153,.12); color: var(--ok); }
.pill.warn { background: rgba(251,146,60,.13); color: var(--warn); }
.pill.glass { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(8px); }

.seg { display: flex; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; min-height: 40px; padding: 8px; border-radius: 12px; background: transparent; color: var(--t2); font-size: 14px; }
.seg button.on { background: var(--s3); color: var(--text); }
.scroller { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 14px; padding: 0 18px; scroll-snap-type: x mandatory; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 12px; font-size: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--t2); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.bar { height: 8px; background: var(--s3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--lime); transition: width .5s var(--ease); }

/* ---------- gün renkleri ---------- */
.g-d1 { --ga: var(--d1a); --gb: var(--d1b); } .g-d2 { --ga: var(--d2a); --gb: var(--d2b); }
.g-d3 { --ga: var(--d3a); --gb: var(--d3b); } .g-d4 { --ga: var(--d4a); --gb: var(--d4b); }
.grad { background: linear-gradient(135deg, var(--ga), var(--gb)); }
.day-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--ga), var(--gb)); flex: none; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
.top .date { font-size: 13px; color: var(--t2); font-weight: 600; text-transform: capitalize; }
.top h1 { margin: 2px 0 0; font-size: 26px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #0a0b0e; background: linear-gradient(135deg, var(--lime), #7ee8a2); flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.avatar.lg { width: 76px; height: 76px; font-size: 30px; }

/* ---------- hero ---------- */
.hero { position: relative; border-radius: 28px; overflow: hidden; padding: 20px; min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; box-shadow: var(--shadow); isolation: isolate; }
.hero .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; z-index: -2; filter: grayscale(.3) contrast(1.05); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, color-mix(in srgb, var(--ga) 88%, transparent) 0%, color-mix(in srgb, var(--gb) 70%, transparent) 45%, rgba(10,11,14,.92) 100%); }
.hero h2 { font-size: 30px; margin: 10px 0 6px; color: #fff; }
.hero .meta { display: flex; gap: 14px; font-size: 13.5px; font-weight: 600; opacity: .92; flex-wrap: wrap; }
.hero .meta span { display: inline-flex; align-items: center; gap: 5px; }

.day-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.day-card { border-radius: var(--r); padding: 12px; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; color: #fff; font-size: 13.5px; font-weight: 700; text-align: left; position: relative; overflow: hidden; }
.day-card small { font-weight: 600; opacity: .85; font-size: 11.5px; }
.day-card.done::after { content: ''; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0b0e' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- hafta ---------- */
.week-card { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 24px; font-weight: 800; } .ring .lbl span { font-size: 11px; color: var(--t2); display: block; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 16px; }
.strip div { text-align: center; font-size: 11.5px; color: var(--t3); font-weight: 600; }
.strip i { display: grid; place-items: center; margin: 6px auto 0; width: 34px; height: 34px; border-radius: 12px; background: var(--s2); font-style: normal; font-size: 13px; color: var(--t2); }
.strip .today i { box-shadow: 0 0 0 2px var(--lime) inset; color: var(--text); }
.strip .done i { color: #fff; background: linear-gradient(135deg, var(--ga), var(--gb)); }

/* ---------- egzersiz listesi ---------- */
.ex-row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 10px; cursor: pointer; transition: transform .12s var(--ease); width: 100%; text-align: left; font-weight: 400; min-height: auto; }
.ex-row:active { transform: scale(.985); }
.thumb { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; background: var(--s2); flex: none; }
.ex-row .idx { position: absolute; }
.ex-name { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.ex-sub { font-size: 13px; color: var(--t2); margin: 2px 0 6px; }
.thumb-wrap { position: relative; flex: none; }
.thumb-wrap .n { position: absolute; left: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #0a0b0e; background: var(--lime); border: 3px solid var(--s1); }

/* ---------- antrenman ---------- */
.wk-top { position: sticky; top: 0; z-index: 12; margin: 0 -18px 14px; padding: calc(10px + var(--safe-t)) 18px 12px; background: rgba(10,11,14,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.wk-top .bar { height: 6px; margin-top: 10px; } .wk-top .bar > i { background: linear-gradient(90deg, var(--ga), var(--gb)); }
.ex-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 14px; transition: border-color .3s; }
.ex-card.done { border-color: rgba(52,211,153,.45); }
.ex-card .head { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.ex-card .thumb { width: 64px; height: 64px; border-radius: 14px; }
.sugg { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; background: var(--s2); color: var(--t2); border-radius: 14px; padding: 10px 12px; margin-top: 12px; }
.sugg .ico { margin-top: 1px; color: var(--t2); }
.sugg.up { background: rgba(251,146,60,.12); color: #fdba74; } .sugg.up .ico { color: var(--warn); }
.sets-h, .set { display: grid; grid-template-columns: 30px 1fr 1fr 48px; gap: 8px; align-items: center; }
.sets-h { font-size: 11.5px; color: var(--t3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: center; margin: 14px 0 2px; }
.set { margin-top: 8px; }
.set .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--s2); color: var(--t2); }
.set input { text-align: center; padding: 11px 6px; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 12px; }
.set.on input { background: rgba(52,211,153,.08); color: var(--ok); }
.set.on .n { background: var(--ok); color: #0a0b0e; }
.chk { width: 48px; height: 46px; min-height: 46px; padding: 0; border-radius: 14px; background: var(--s2); color: var(--t3); border: 1.5px solid var(--line); }
.chk.on { background: var(--ok); color: #0a0b0e; border-color: var(--ok); animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(1.12); } }
.finish-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 12px 18px calc(12px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 60%, transparent); }
.finish-bar > div { max-width: 524px; margin: 0 auto; display: flex; gap: 10px; }

/* ---------- alt menü ---------- */
#nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 10; width: min(calc(100% - 24px), 520px); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: rgba(27,30,37,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 26px; padding: 6px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.8); }
#nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; color: var(--t3); font-size: 11px; font-weight: 700; border-radius: 18px; transition: color .2s; min-height: 52px; justify-content: center; }
#nav a.on { color: var(--text); }
#nav a.on .ico { color: var(--lime); }
#nav .fab { width: 56px; height: 56px; min-height: 56px; margin: -22px auto 0; border-radius: 20px; background: var(--lime); color: #0a0b0e; display: grid; place-items: center; box-shadow: 0 10px 26px -6px rgba(212,255,58,.6); padding: 0; }
#nav .fab .ico { width: 26px; height: 26px; stroke-width: 2.5; }

/* ---------- modal (bottom sheet) ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 30; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal .sheet { background: var(--s1); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 10px 18px calc(24px + var(--safe-b)); animation: up .3s var(--ease); }
.modal .sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--s3); margin: 0 auto 14px; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
@media (min-width: 700px) { .modal { align-items: center; } .modal .sheet { border-radius: 28px; } }
.anim { border-radius: 20px; overflow: hidden; background: var(--s2); }
.anim img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.tips { padding: 0; margin: 10px 0; list-style: none; counter-reset: t; }
.tips li { position: relative; padding: 0 0 0 36px; margin: 12px 0; font-size: 15px; color: var(--t2); counter-increment: t; }
.tips li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 8px; background: var(--s3); color: var(--lime); font-weight: 800; font-size: 12.5px; display: grid; place-items: center; }
.tips.dot li::before { content: ''; width: 8px; height: 8px; top: 8px; left: 8px; border-radius: 50%; background: var(--lime); }

/* ---------- timer ---------- */
.timer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); z-index: 20; background: var(--text); color: var(--bg); font-weight: 800; padding: 8px 8px 8px 16px; border-radius: 99px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); white-space: nowrap; animation: up .3s var(--ease); font-variant-numeric: tabular-nums; }
.timer .t { font-size: 20px; min-width: 52px; }
.timer button { min-height: 36px; padding: 6px 12px; border-radius: 99px; background: rgba(10,11,14,.1); color: var(--bg); font-size: 13px; }
.toast { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-weight: 700; font-size: 14.5px; padding: 12px 18px; border-radius: 16px; z-index: 40; max-width: 90vw; box-shadow: var(--shadow); animation: up .25s var(--ease); }

/* ---------- ekip ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 16px; }
.podium > div { text-align: center; }
.podium .blk { margin-top: 8px; border-radius: 16px 16px 6px 6px; padding: 10px 4px; background: var(--s1); border: 1px solid var(--line); font-weight: 800; }
.podium .p1 .blk { height: 96px; background: linear-gradient(180deg, rgba(212,255,58,.22), var(--s1)); border-color: rgba(212,255,58,.3); }
.podium .p2 .blk { height: 72px; } .podium .p3 .blk { height: 56px; }
.podium .nm { font-size: 13.5px; font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row { display: flex; gap: 12px; align-items: center; }
.rank { width: 26px; text-align: center; font-weight: 800; color: var(--t3); font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 4px; } .dots i { width: 22px; height: 6px; border-radius: 4px; background: var(--s3); } .dots i.on { background: linear-gradient(90deg, var(--ga), var(--gb)); }

/* ---------- login ---------- */
.login { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; }
.blob { position: fixed; z-index: -1; filter: blur(70px); opacity: .5; border-radius: 50%; pointer-events: none; }
.logo-mark { width: 72px; height: 72px; border-radius: 24px; background: var(--lime); color: #0a0b0e; display: grid; place-items: center; margin-bottom: 20px; box-shadow: 0 16px 40px -10px rgba(212,255,58,.6); }
.logo-mark .ico { width: 38px; height: 38px; stroke-width: 2.4; }

.install { position: fixed; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 25; background: var(--s2); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); max-width: 536px; margin: 0 auto; animation: up .3s var(--ease); }
.install img { width: 44px; height: 44px; border-radius: 12px; }
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 30px 18px; color: var(--t2); }
.empty .ico { width: 40px; height: 40px; color: var(--t3); margin-bottom: 8px; }
canvas { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
