/* Компоненты мини-аппа (на токенах tokens.css). Снято с HALO v4, урезано до каркаса. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg, var(--page)); color: var(--text, var(--ink)); font-family: var(--font, var(--font-text)); -webkit-font-smoothing: antialiased; }
body { padding: calc(var(--safe-t, 0px) + var(--pad, 16px)) var(--pad, 16px) calc(var(--safe-b, 0px) + 32px); max-width: var(--maxw, 640px); margin: 0 auto; }
.hidden { display: none !important; }
.muted { color: var(--text3, var(--ink-soft)); }
.top { display: flex; align-items: center; gap: var(--sp-3, 12px); margin-bottom: var(--sp-6, 24px); }
body { padding-bottom: calc(var(--safe-b, 0px) + var(--tab-h, 64px) + 24px); }
.who { width: 36px; height: 36px; border-radius: 50%; background: var(--bg3, var(--card)); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--brand); }
.title { font-family: var(--font-display); font-size: 22px; margin: 0; font-weight: 600; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: var(--sp-6, 24px) 0 var(--sp-3, 12px); }
.section-head h2, .section-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.list { display: grid; gap: var(--sp-3, 12px); }
.card { text-align: left; width: 100%; border: 1px solid var(--line, var(--hairline)); background: var(--bg2, var(--card)); color: inherit; border-radius: var(--r-l, var(--r-md, 18px)); padding: var(--sp-4, 16px); box-shadow: var(--shadow); font: inherit; cursor: pointer; transition: transform .15s var(--ease, ease); }
.card:active { transform: scale(.985); }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.card-sub { color: var(--text2, var(--ink-soft)); font-size: 14px; margin-bottom: var(--sp-2, 8px); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2, 8px); }
.chip { border: 1px solid var(--line2, var(--hairline)); background: var(--bg3, transparent); color: var(--text2, var(--ink-soft)); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-family: inherit; cursor: pointer; }
.chip.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.stage-new { color: var(--stage-new, var(--ink-soft)); }
.chip.stage-work { color: var(--stage-work, var(--green)); }
.chip.stage-done { color: var(--stage-done, var(--brand)); }
.chip.stage-lost { color: var(--stage-lost, var(--red)); }
.hero { padding: var(--sp-6, 24px) var(--sp-4, 16px); border-radius: var(--r-xl, var(--r-lg, 24px)); background: linear-gradient(135deg, var(--bg3, var(--card)), var(--bg2, var(--card))); border: 1px solid var(--line, var(--hairline)); box-shadow: var(--shadow-2, var(--shadow)); }
.hero-kicker { color: var(--brand); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.hero-title { font-family: var(--font-display); font-size: 26px; margin: 0 0 var(--sp-3, 12px); line-height: 1.15; }
.text { color: var(--text2, var(--ink-soft)); line-height: 1.5; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.row { display: flex; justify-content: space-between; gap: var(--sp-3, 12px); padding: 10px 12px; border-radius: var(--r-m, var(--r-sm, 13px)); background: var(--bg2, var(--card)); border: 1px solid var(--line, var(--hairline)); font-size: 14px; }
.row.done { opacity: .55; text-decoration: line-through; }
.row.overdue { border-color: var(--danger, var(--red)); }
.empty { padding: var(--sp-6, 24px); text-align: center; color: var(--text3, var(--ink-soft)); }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b, 0px) + var(--tab-h, 64px) + 16px); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--bg4, var(--ink)); color: var(--text, #fff); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); transition: transform .32s var(--ease), opacity .32s var(--ease); z-index: 30; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ── Переходы и анимации (единый почерк: --ease, лёгкий подъём + затухание) ── */
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.list .card { animation: cardIn .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

@keyframes chipPop { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
.status-chip.pop { animation: chipPop .34s var(--ease); }

.screen { will-change: opacity, transform; }

/* ФитПинг: навигация по дням, карточки занятий, статус-чипы явки */
.daynav { display: flex; gap: 8px; align-items: center; }
.chip-ghost { background: transparent; color: var(--brand); border-color: var(--brand-soft, var(--line2)); }
.class-card { cursor: default; }
.class-card:active { transform: none; }
.rows .row { cursor: pointer; }
.status-chip { transition: background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease); }
.status-chip.status-pending { color: var(--text3, var(--ink-soft)); }
.status-chip.status-confirmed { color: var(--green, #2e9e5b); border-color: var(--green, #2e9e5b); }
.status-chip.status-attended { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.status-chip.status-missed { color: var(--red, #d84f4f); border-color: var(--red, #d84f4f); }

/* Клиенты: карточка со стриком */
.client-card { display: flex; align-items: center; justify-content: space-between; }
.client-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.client-phone { color: var(--text3, var(--ink-soft)); font-size: 13px; margin-top: 2px; }
.streak-badge { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }

/* Нижний таббар — стекло, как в iOS */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; padding: 8px 12px calc(var(--safe-b, 0px) + 8px); gap: 4px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-top: 1px solid var(--line); z-index: 20; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; background: none; border: none; color: var(--text3, var(--ink-soft)); font: inherit; font-size: 11px; cursor: pointer; border-radius: var(--r-m, 14px); transition: color .2s var(--ease), transform .15s var(--ease); }
.tab svg { transition: transform .2s var(--ease); }
.tab:active { transform: scale(.94); }
.tab.active { color: var(--brand); }
.tab.active svg { transform: translateY(-1px) scale(1.06); }
