/* =========================================================
   PT Takip — mobil öncelikli arayüz
   ========================================================= */
:root {
  --accent: #5f7f6b;
  --accent-ink: #fff;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --ink: #1f2a24;
  --ink-2: #4c5852;
  --muted: #7d8781;
  --line: #e4e0d7;
  --danger: #c0473b;
  --warn: #c98a1b;
  --info: #3f74c9;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30, 40, 35, .06), 0 4px 14px rgba(30, 40, 35, .05);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --accent-mid: color-mix(in srgb, var(--accent) 35%, white);
  --fig: #2f3e36;
  --fig-far: #a9b8ae;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
a { color: inherit; }
p { margin: .4em 0; }
img, video { max-width: 100%; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.center { text-align: center; }
.pad { padding: 24px 12px; }
.pad-x { padding: 0 4px; }
.pre { white-space: pre-wrap; }
.break { word-break: break-all; }
.warn-text { color: var(--warn); }

/* ---------- Üst bar ve alt menü ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  min-height: 54px; padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { flex: 1; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { font-size: 30px; line-height: 1; width: 36px; margin-left: -6px; }
.topbar .actions { display: flex; gap: 6px; }

.view { max-width: 760px; margin: 0 auto; padding: 14px 14px calc(var(--tabbar-h) + var(--safe-b) + 28px); }
.view-inner > * + * { margin-top: 12px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--accent); }
.tabbar a.tab-main svg { width: 40px; height: 40px; padding: 7px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-top: -12px; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); stroke-width: 2.2; }
.tabbar a.tab-main { color: var(--ink-2); }

@media (min-width: 900px) {
  .tabbar { top: 0; bottom: 0; right: auto; width: 92px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: start; padding-top: 70px; border-top: 0; border-right: 1px solid var(--line); }
  .topbar, .view { margin-left: 92px; }
  .view { padding-bottom: 40px; }
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost.danger { color: var(--danger); background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--accent-ink) transparent var(--accent-ink) transparent; animation: spin .8s linear infinite; }
.btn:not(.primary).loading::after { border-color: var(--accent) transparent var(--accent) transparent; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-size: 16px; color: var(--ink-2); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.danger { color: var(--danger); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; }
.file-btn { cursor: pointer; }

/* ---------- Kartlar, listeler ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.card-title small { font-weight: 500; color: var(--muted); font-size: 12px; }
.card-title-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.card-title-row .card-title { margin: 0; }
.sub { font-size: 14px; font-weight: 700; margin: 16px 0 6px; color: var(--ink-2); text-transform: none; }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; text-decoration: none; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.card .list .row:last-child, .card.flush .row:last-child { border-bottom: 0; }
.card:not(.flush) .list .row { padding-left: 0; padding-right: 0; }
.row:active { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); font-size: 13px; }
.row-main small.note { color: var(--ink-2); font-style: italic; }
.row-main small.last { color: var(--ink-2); }
.row-main small.sug { color: var(--accent); font-weight: 600; }
.chev { color: var(--muted); font-size: 20px; }
.count { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 20px; padding: 2px 8px; }
.idx { width: 20px; color: var(--muted); font-weight: 700; font-size: 13px; text-align: center; }

.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

.thumb { flex: none; width: 58px; height: 46px; border-radius: 10px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb .fig { width: 100%; height: 100%; }
.thumb.photo img { width: 100%; height: 100%; object-fit: cover; }
.thumb.letter { font-weight: 800; color: var(--accent); font-size: 18px; background: var(--accent-soft); }
.thumb-btn { padding: 0; border: 0; background: none; cursor: pointer; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--surface-2); color: var(--ink-2); }
.badge.warn { background: #fbecd2; color: #8a5b08; }
.badge.info { background: #e1ebfa; color: #2c5596; }
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); color: var(--ink-2); }
.tag.strong { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }

.alert { padding: 10px 12px; border-radius: var(--radius-sm); background: #fbecd2; color: #6e4a06; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.alert.err { background: #f8dcd8; color: #8a2a20; }
.alert.ok { background: #dcefe2; color: #245a34; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 2px; }
.caution { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: #fbf1e0; color: #6e4a06; font-size: 14px; }

.empty { text-align: center; padding: 34px 16px; color: var(--ink-2); }
.empty-icon { font-size: 38px; margin-bottom: 6px; }
.empty h4 { font-size: 17px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 14px; }

.loading-view { display: flex; justify-content: center; padding: 60px 0; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--accent-mid); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formlar ---------- */
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.form h2 { font-size: 16px; margin: 18px 0 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-size: 16px; /* iOS yakınlaştırmasın */
  font-weight: 400; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.search { margin-bottom: 2px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237d8781' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 12px 50% !important; padding-left: 38px !important; }
.form .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.switch { flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { flex: none; position: relative; width: 44px; height: 26px; border-radius: 20px; background: #cfcac0; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch.tight { margin-top: 22px; }

.seg { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.seg label { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 0; font-weight: 500; color: var(--ink); }

/* ---------- Sekmeler, çipler ---------- */
.scroll-x { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
.chips { gap: 6px; padding: 2px 0; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs { gap: 4px; border-bottom: 1px solid var(--line); margin-top: 6px !important; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 10px 8px; font-size: 14.5px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.seg-tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg-tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.seg-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-tabs.small button { font-size: 13px; padding: 6px; }

/* ---------- Ana sayfa ---------- */
.hero { background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 16px; }
.hero .hello { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; }
.stat span { font-size: 12px; opacity: .9; }
.hero .btn { background: rgba(255,255,255,.95); border-color: transparent; color: var(--ink); }
.hero .btn.primary { background: var(--ink); color: #fff; }
.pain-badge { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fbecd2; color: #8a5b08; font-weight: 800; font-size: 12px; }

/* ---------- Danışan ---------- */
.client-head { display: flex; gap: 12px; align-items: center; }
.client-head .goal { margin: 2px 0 0; font-size: 14px; }
.day { margin-top: 10px; }
.day + .day { border-top: 1px dashed var(--line); padding-top: 10px; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-head h4 { font-size: 15px; color: var(--accent); }
.ex-row .chev { font-size: 16px; }
.info { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; margin: 0 0 12px; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.link-box { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-2); border-radius: 8px; padding: 10px; word-break: break-all; margin: 8px 0; }
.danger-zone { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.share-list { display: flex; flex-direction: column; gap: 8px; }
.share-item { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; cursor: pointer; width: 100%; }
.share-item > span { font-size: 24px; }
.share-item small { display: block; color: var(--muted); font-size: 12px; }

.sess { display: block; text-decoration: none; }
.sess-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sess-badges { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.sess-sets { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; }
.sess-sets li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.sess-sets small { color: var(--muted); text-align: right; }
.own-actions { display: flex; justify-content: flex-end; margin-top: -6px !important; }

/* ---------- Gelişim ---------- */
.prog-row .row-main strong { color: var(--ink); }
.spark-wrap { flex: none; }
.spark { width: 72px; height: 24px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--accent); }
.delta { font-weight: 700; font-size: 12px; }
.delta.up { color: #2f7d4a; }
.delta.down { color: var(--danger); }
.delta.neutral { color: var(--ink-2); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { background: var(--surface); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile b { font-size: 20px; line-height: 1.25; }
.tile small { font-size: 11px; color: var(--muted); }
.tile.accent { background: var(--accent); color: var(--accent-ink); }
.tile.accent span, .tile.accent small { color: inherit; opacity: .85; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.ex-head { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 0; }

.chart-card { padding: 10px 8px 4px; }
.chart-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 0 6px 4px; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ylab, .chart .xlab { font-size: 10px; fill: var(--muted); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .08; }
.chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .pt.max .dot { fill: var(--accent); }
.chart .pt.on .dot { r: 6; fill: var(--accent); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: var(--ink); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.chart-empty { padding: 30px; text-align: center; color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.pr td { background: var(--accent-soft); }
.pr-badge { font-size: 10px; font-weight: 800; background: var(--accent); color: var(--accent-ink); padding: 1px 5px; border-radius: 6px; }

/* ---------- Hareket çizimleri ---------- */
.fig { display: block; width: 100%; height: auto; }
.fx-limb, .fx-body { stroke: var(--fig); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fx-limb.far { stroke: var(--fig-far); }
.fx-head { fill: var(--fig); }
.fx-mat { fill: var(--accent-mid); }
.fx-floor { stroke: #c9c3b8; }
.fx-frame { fill: #9b8a74; }
.fx-carriage, .fx-box { fill: #ddd0bb; }
.fx-metal { stroke: #8d8d8d; stroke-linecap: round; fill: none; }
.fx-metal-fill { fill: #8d8d8d; }
.fx-spring { stroke: #c45a4a; fill: none; }
.fx-strap { stroke: #6b6b6b; }
.fx-weight { fill: #d27c3b; }
.fx-weight.far { fill: #ebbd96; }
.fx-plate { fill: #4b4b4b; }
.fx-kb-handle { stroke: #d27c3b; fill: none; stroke-width: 2.4; }
.fig-stage { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border-radius: var(--radius); padding: 8px 6px 0; cursor: pointer; max-width: 520px; margin: 0 auto; }
.fig-stage.paused { opacity: .85; }
.fig-hint { text-align: center; font-size: 11px; color: var(--muted); margin: 4px 0 8px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.media { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.media img, .media video { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.media figcaption { font-size: 12px; padding: 5px 8px; color: var(--ink-2); }
.media.yt, .media.vid { grid-column: 1 / -1; }
.media.vid video, .yt-frame iframe, .yt-thumb img { aspect-ratio: 16/9; }
.yt-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.yt-thumb img { width: 100%; object-fit: cover; opacity: .9; }
.yt-thumb .play { position: absolute; inset: 0; margin: auto; width: 60px; height: 42px; border-radius: 12px; background: #e33; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.yt-frame iframe { display: block; width: 100%; border: 0; }
.link-card { display: flex; align-items: center; gap: 10px; padding: 14px; text-decoration: none; font-weight: 600; }
.link-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.media-del { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.prose { white-space: pre-wrap; }
.cues { padding-left: 20px; margin: 4px 0; }
.cues li { margin: 3px 0; }
.ex-sheet > * + * { margin-top: 8px; }
.upload-progress { margin-top: 10px; background: var(--surface-2); border-radius: 8px; height: 26px; position: relative; overflow: hidden; }
.upload-progress .bar { height: 100%; width: 0; background: var(--accent-mid); transition: width .2s; }
.upload-progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }

.illus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-bottom: 12px; max-height: 340px; overflow-y: auto; padding: 2px; }
.illus-opt { border: 2px solid var(--line); background: var(--surface); border-radius: 10px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-height: 80px; justify-content: center; }
.illus-opt small { font-size: 10px; color: var(--muted); line-height: 1.2; text-align: center; }
.illus-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.illus-opt .none { font-size: 12px; color: var(--muted); }

/* ---------- Yaylar ---------- */
.springs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.spring-chip { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 13px; }
.spring-chip i, .sp-name i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.spring-btn { min-height: 44px; border: 1px dashed var(--accent-mid); background: var(--surface); border-radius: 10px; cursor: pointer; padding: 4px 8px; display: flex; align-items: center; justify-content: center; }
.spring-picker .sp-row { display: grid; grid-template-columns: 1fr 40px 36px 40px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sp-name small { color: var(--muted); font-weight: 500; }
.sp-count { text-align: center; font-size: 18px; }
.spring-edit { display: grid; grid-template-columns: 44px 1fr 70px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.spring-edit.head { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.spring-edit input[type=color] { width: 44px; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.accents { display: flex; gap: 10px; margin-bottom: 14px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Program düzenleyici ---------- */
.day-edit-head { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.day-edit-head .day-title { flex: 1 1 100%; }
.day-title { font-weight: 700; color: var(--accent); }
.mini-actions { display: flex; flex: none; }
.item-edit { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: var(--bg); }
.item-head { display: flex; align-items: center; gap: 8px; }
.item-head .thumb { width: 48px; height: 38px; }
.item-name { flex: 1; min-width: 0; font-size: 14px; }
.item-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 6px; }
.mini { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); margin: 0 !important; }
.mini input { padding: 8px 6px !important; text-align: center; min-height: 42px !important; }
.mini .spring-btn { min-height: 42px; }
.item-note { font-size: 14px !important; min-height: 38px !important; padding: 7px 10px !important; }
.add-ex { border: 1px dashed var(--accent-mid) !important; }

/* ---------- Seans kaydı ---------- */
.log-top .client-line { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 0 0 8px; }
.health-flag { font-size: 12px; color: #8a5b08; background: #fbecd2; border-radius: 20px; padding: 2px 8px; }
details.health { font-size: 13px; background: #fbf1e0; border-radius: 10px; padding: 8px 10px; }
details.health summary { font-weight: 600; cursor: pointer; }
.block-head { display: flex; gap: 10px; align-items: flex-start; }
.block-head .thumb { width: 52px; height: 42px; }
.block.skipped { opacity: .6; }
.sets { margin-top: 10px; }
.set-row { display: grid; grid-template-columns: 26px 1fr 1fr 36px; gap: 8px; align-items: center; margin-bottom: 6px; }
.set-row.head { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 2px; text-align: center; }
.set-no { text-align: center; font-weight: 800; color: var(--muted); }
.cell { text-align: center; font-weight: 600; font-size: 17px !important; }
.block-foot { display: flex; justify-content: space-between; margin-top: 4px; }
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(28px, 1fr)); gap: 4px; margin-bottom: 4px; }
.scale button { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 700; cursor: pointer; padding: 0; }
.scale button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.scale button.hot.on { background: var(--warn); border-color: var(--warn); }
.scale-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.save-bar { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 10; padding-top: 4px; }
.save-bar .btn { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); min-height: 52px; font-size: 16px; }
@media (min-width: 900px) { .save-bar { bottom: 12px; } }

/* ---------- Alt panel (sheet) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 25, 22, .4); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0;
  transform: translateY(100%); transition: transform .22s ease-out;
  padding-bottom: var(--safe-b);
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 12px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { flex: 1; font-size: 17px; }
.grab { position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line); }
.sheet-body { overflow-y: auto; padding: 14px 16px 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot { position: sticky; bottom: -18px; display: flex; gap: 8px; background: var(--surface); padding: 10px 0 4px; margin-top: 8px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 480px; border-radius: 18px; transform: translate(-50%, -46%); opacity: 0; transition: transform .2s, opacity .2s; max-height: 86vh; }
  .sheet.wide { width: 640px; }
  .sheet-wrap.open .sheet { transform: translate(-50%, -50%); opacity: 1; }
}
.confirm-msg { font-size: 15px; margin: 4px 0 16px; }
.picker .search { margin-bottom: 8px; }
.picker .chips { margin-bottom: 6px; }
.pick-list .row { padding-left: 2px; padding-right: 2px; }
.row.pick.sel { background: var(--accent-soft); }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.row.pick.sel .check { background: var(--accent); border-color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.client-page .toast { bottom: 24px; }

/* ---------- Giriş / kurulum ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; margin: 40px auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 26px 22px; }
.auth-card.wide { max-width: 520px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; text-align: center; }
.auth-card > .muted { text-align: center; margin-bottom: 18px; }
.brand-mark { display: flex; justify-content: center; margin-bottom: 10px; }
.brand-mark img { width: 60px; height: 60px; }
.checklist { list-style: none; padding: 0; font-size: 14px; margin: 12px 0; }
.checklist li { padding: 3px 0; }
.checklist .ok { color: #2f7d4a; }
.checklist .bad { color: var(--danger); font-weight: 700; }
.auth-card .alert { margin-bottom: 12px; }

/* ---------- Danışan sayfası ---------- */
.client-page .c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 12px; background: var(--accent); color: var(--accent-ink); }
.client-page .c-head .studio { margin: 0; font-size: 12px; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.client-page .c-head h1 { font-size: 22px; }
.client-page .c-head .btn { background: rgba(255,255,255,.95); color: var(--ink); border: 0; }
.client-page .c-tabs { background: var(--surface); margin: 0 !important; padding: 0 8px; position: sticky; top: 0; z-index: 5; }
.client-page .c-view { padding-bottom: 30px; }
.client-page .c-view > * + * { margin-top: 12px; }
.c-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0 30px; }
.back-link { display: inline-block; text-decoration: none; color: var(--accent); font-weight: 600; }
.page-title { font-size: 20px; }

/* ---------- Yazdırma ---------- */
.print-page { max-width: 800px; margin: 0 auto; padding: 20px; background: #fff; }
.print-page h1 { font-size: 24px; }
.print-day h2 { font-size: 18px; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); color: var(--accent); }
.print-item { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.print-item h3 { font-size: 15px; }
.print-item p, .print-item li { font-size: 13px; margin: 3px 0; }
.print-item .plan { font-weight: 700; color: var(--accent); }
.print-fig { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.print-fig .fig { background: #f6f4ef; border-radius: 6px; }
@media (max-width: 560px) { .print-item { grid-template-columns: 1fr; } .print-fig { max-width: 260px; } }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .no-print, .tabbar, .topbar, .toast { display: none !important; }
  .print-page { padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
