:root { --bg:#f3f5f9; --card:#fff; --ink:#1c2230; --muted:#7a8399; --pri:#2f6bff; --ok:#1a9e57; --err:#d23f3f; --line:#e4e8f2; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; background:var(--bg); color:var(--ink); font-size:15px; }
.header { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 14px; background:var(--pri); color:#fff; position:sticky; top:0; z-index:5; }
.logo { display:flex; align-items:center; gap:8px; font-weight:700; }
.who { font-size:13px; opacity:.9; max-width:45%; text-align:right; }
.header-right { display:flex; align-items:center; gap:8px; }
.btn-logout { background:rgba(255,255,255,.16); color:#fff; border:1px solid rgba(255,255,255,.45); white-space:nowrap; }
.btn-logout:hover { background:rgba(255,255,255,.26); }
.screen { padding:14px; max-width:720px; margin:0 auto; }
h2 { font-size:19px; margin:6px 0 12px; }
h3 { margin:0 0 10px; font-size:16px; }
.muted { color:var(--muted); }
.hint { color:var(--muted); font-size:11px; }
.row-between { display:flex; justify-content:space-between; align-items:center; }
.row { display:flex; gap:8px; justify-content:flex-end; margin-top:10px; }
.btn { border:0; border-radius:10px; padding:11px 16px; font-size:15px; font-weight:600; cursor:pointer; background:#e9edf6; color:var(--ink); }
.btn-primary { background:var(--pri); color:#fff; }
.btn-secondary { background:#e9edf6; }
.btn-sm { padding:7px 11px; font-size:14px; border-radius:9px; }
.btn-back { margin-bottom:8px; }
.btn:disabled { opacity:.55; }
.btn-block { width:100%; }
.list { display:flex; flex-direction:column; gap:10px; }
.card { background:var(--card); border-radius:14px; padding:12px; box-shadow:0 1px 3px rgba(20,30,60,.06); }
.child-card { display:flex; align-items:center; gap:12px; cursor:pointer; }
.child-card:active { background:#f0f4ff; }
.cc-ava { width:42px; height:42px; border-radius:50%; background:#eef1f8; display:flex; align-items:center; justify-content:center; font-size:22px; }
.cc-main { flex:1; display:flex; flex-direction:column; }
.cc-main small { color:var(--muted); }
.cc-coins { font-size:13px; color:#b8860b; white-space:nowrap; }
.cc-subs { margin-top:2px; color:#2b6cb0; }
.tag { font-size:11px; padding:3px 8px; border-radius:999px; background:#eef1f8; color:#5a6a8a; white-space:nowrap; }
.tag.ok { background:#e4f7ec; color:var(--ok); }
.lesson-meta { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.stat { background:var(--card); border-radius:12px; padding:10px; text-align:center; box-shadow:0 1px 3px rgba(20,30,60,.06); }
.stat b { display:block; font-size:20px; }
.stat span { font-size:11px; color:var(--muted); }
.tabs { display:flex; gap:6px; margin:6px 0 12px; }
.tab { flex:1; border:0; border-radius:10px; padding:9px 6px; font-size:13px; font-weight:600; background:#e9edf6; color:#5a6a8a; cursor:pointer; }
.tab.on { background:var(--pri); color:#fff; }
.tabpane { animation:fade .15s ease; }
@keyframes fade { from { opacity:.4 } to { opacity:1 } }
.metric-card { }
.metric-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.metric-h b { font-size:15px; }
.metric-cur { font-size:18px; font-weight:700; color:var(--pri); font-variant-numeric:tabular-nums; }
.metric-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.hist { margin-top:8px; border-top:1px dashed var(--line); padding-top:6px; display:flex; flex-direction:column; gap:3px; max-height:170px; overflow:auto; }
.hist-row { display:flex; justify-content:space-between; font-size:12px; color:#41506e; }
.hist-row .v { font-variant-numeric:tabular-nums; font-weight:600; }
.coin-balance { display:flex; justify-content:space-between; align-items:center; }
.coin-balance b { font-size:22px; color:#b8860b; }
.tx { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px dashed var(--line); }
.tx:last-child { border-bottom:0; }
.tx-main { display:flex; flex-direction:column; }
.tx-main small { color:var(--muted); font-size:11px; }
.tx-amt { font-weight:700; font-variant-numeric:tabular-nums; }
.tx-amt.plus { color:var(--ok); }
.tx-amt.minus { color:var(--err); }
.prod { display:flex; gap:10px; align-items:center; }
.prod-photo { width:52px; height:52px; border-radius:10px; object-fit:cover; background:#eef1f8; display:flex; align-items:center; justify-content:center; font-size:24px; }
.prod-main { flex:1; display:flex; flex-direction:column; }
.prod-main small { color:var(--muted); }
.prod-price { font-weight:700; color:#b8860b; white-space:nowrap; }
.prod-main .prod-cat { align-self:flex-start; margin:2px 0 3px; font-size:11px; font-weight:600; color:#5566aa; background:#eef1fb; border-radius:999px; padding:1px 8px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 10px; }
.chip { border:1px solid #d8deee; background:#fff; color:#445; border-radius:999px; padding:5px 11px; font-size:12.5px; cursor:pointer; line-height:1; }
.chip.on { background:#3b5bdb; border-color:#3b5bdb; color:#fff; }
.order { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.order-main { display:flex; flex-direction:column; }
.order-main small { color:var(--muted); }
.badge { font-size:11px; padding:3px 8px; border-radius:999px; }
.badge.new { background:#fff4e0; color:#b8860b; }
.badge.done { background:#e4f7ec; color:var(--ok); }
.badge.cancelled { background:#fbe7e7; color:var(--err); }
.fld { display:flex; flex-direction:column; gap:4px; margin:8px 0; }
.fld > span { font-size:12px; color:var(--muted); }
.fld input, .fld select { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:9px; font-size:14px; background:#fff; color:var(--ink); }
.msg { margin-top:10px; font-size:13px; min-height:16px; }
.msg.ok { color:var(--ok); } .msg.err { color:var(--err); }
.loading { display:flex; flex-direction:column; align-items:center; padding:60px 0; color:var(--muted); }
.spinner { width:34px; height:34px; border:3px solid #d8deee; border-top-color:var(--pri); border-radius:50%; animation:sp 0.9s linear infinite; margin-bottom:12px; }
@keyframes sp { to { transform:rotate(360deg); } }

[hidden] { display: none !important; }

/* Кабинет родителя: расписание + абонемент (2026-10-05) */
.tabs { flex-wrap: wrap; }
.tab { flex:1 1 auto; min-width:88px; }
.day { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.day-h { font-size:12px; font-weight:700; color:#5a6a8a; margin:2px 0 4px; }
.lesson-card { display:flex; gap:10px; align-items:center; }
.lc-time { font-weight:700; font-variant-numeric:tabular-nums; color:var(--pri); min-width:92px; }
.lc-main { display:flex; flex-direction:column; min-width:0; }
.lc-main small { color:var(--muted); }
.stat-grid .stat b { font-size:16px; }
.sub-h { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.sub-grid { display:flex; flex-direction:column; gap:4px; }
.sub-row { display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.sub-row span { color:var(--muted); }
.sub-row b { font-variant-numeric:tabular-nums; }

/* Магазин: клик по товару → карточка, модалка, отмена заказа (2026-10-06) */
.prod { cursor:pointer; }
.prod:active { background:#f0f4ff; }
.prod-more { font-size:12px; color:var(--pri); font-weight:600; }
.order-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }

.modal { position:fixed; inset:0; background:rgba(18,24,38,.55); display:flex; align-items:flex-end; justify-content:center; z-index:50; }
.modal-box { background:var(--card); width:100%; max-width:520px; border-radius:18px 18px 0 0; padding:18px 16px 22px; max-height:88vh; overflow:auto; position:relative; animation:sheetUp .18s ease; }
@keyframes sheetUp { from { transform:translateY(26px); opacity:.5 } to { transform:translateY(0); opacity:1 } }
.modal-close { position:absolute; top:10px; right:10px; border:0; background:#eef1f8; width:32px; height:32px; border-radius:50%; font-size:15px; cursor:pointer; color:#5a6a8a; z-index:1; }
.modal-photo { width:100%; height:220px; border-radius:14px; object-fit:cover; background:#eef1f8; display:block; }
.modal-photo.ph { display:flex; align-items:center; justify-content:center; font-size:64px; }
.modal-title { margin:14px 0 4px; font-size:19px; }
.modal-price { font-size:18px; font-weight:700; color:#b8860b; margin-bottom:8px; }
.modal-desc { font-size:14px; color:#41506e; line-height:1.5; margin-bottom:14px; white-space:pre-wrap; }
.modal-actions { display:flex; gap:8px; margin-top:6px; }
.modal-actions .btn { flex:1; }
.small { font-size:12px; }
.btn-danger { background:#fbe7e7; color:var(--err); }

/* ── Магазин: сегмент «Товары | Заказы» + плашка оплаты (2026-10-22) ── */
.shopseg { display:flex; gap:6px; background:#e7eaf2; padding:4px; border-radius:14px; margin:2px 0 12px; position:sticky; top:52px; z-index:4; }
.sseg { flex:1; border:0; background:transparent; color:#5a6a8a; font-size:13.5px; font-weight:700; padding:9px 6px; border-radius:11px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; }
.sseg.on { background:#fff; color:var(--ink); box-shadow:0 2px 8px rgba(30,40,80,.10); }
.scnt { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:#e5484d; color:#fff; font-size:10.5px; font-weight:800; }
#shopProducts { padding-bottom:78px; }
.shop-remind { position:fixed; left:12px; right:12px; bottom:14px; z-index:30; max-width:696px; margin:0 auto; background:#1c2230; color:#fff; border-radius:16px; padding:11px 12px; display:flex; align-items:center; gap:10px; box-shadow:0 12px 30px -8px rgba(20,30,60,.55); animation:sheetUp .18s ease; }
.sr-ic { width:34px; height:34px; flex:0 0 auto; border-radius:11px; background:rgba(255,255,255,.14); display:flex; align-items:center; justify-content:center; font-size:16px; }
.sr-tx { flex:1; min-width:0; display:flex; flex-direction:column; }
.sr-tx b { font-size:12.5px; font-weight:700; }
.sr-tx small { font-size:11px; opacity:.65; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sr-go { border:0; background:var(--pri); color:#fff; font-size:12px; font-weight:800; padding:9px 12px; border-radius:10px; white-space:nowrap; cursor:pointer; }

/* ── Успехи: чипы метрик, карточка-герой, лента занятий (2026-10-22) ── */
.mchips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; padding:0 0 2px; }
.mchips::-webkit-scrollbar { display:none; }
.mchip { flex:0 0 auto; border:1px solid #dfe3ee; background:#fff; color:#5a6a8a; border-radius:11px; padding:7px 12px; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.mchip.on { background:#eaf0ff; border-color:#b9cdff; color:#2450c8; }
.phero { padding:14px 14px 12px; }
.ph-lab { font-size:11.5px; font-weight:700; color:var(--muted); letter-spacing:.02em; }
.ph-big { display:flex; align-items:flex-end; gap:7px; margin-top:6px; }
.ph-big b { font-size:36px; font-weight:800; letter-spacing:-.03em; line-height:1; color:var(--ink); font-variant-numeric:tabular-nums; }
.ph-big i { font-style:normal; font-size:12px; font-weight:700; color:var(--muted); padding-bottom:5px; }
.ph-spacer { flex:1; }
.ph-sub { font-size:11.5px; color:var(--muted); margin-top:6px; }
.pdelta { font-size:11.5px; font-weight:800; padding:4px 8px; border-radius:8px; white-space:nowrap; }
.pdelta.up { background:#e6f7ec; color:#1a7f45; }
.pdelta.down { background:#fbe7e7; color:#c0392b; }
.pdelta.flat { background:#eef1f8; color:#7a8399; }
.pchart { display:block; margin-top:10px; }
.pchart-x { display:flex; justify-content:space-between; font-size:9.5px; color:#a2a9ba; font-weight:700; margin-top:2px; }
.psec { display:flex; align-items:baseline; justify-content:space-between; margin:16px 2px 8px; }
.psec h3 { margin:0; font-size:14px; }
.pfeed { background:var(--card); border-radius:14px; box-shadow:0 1px 3px rgba(20,30,60,.06); padding:2px 0; }
.prow { display:flex; gap:10px; align-items:center; padding:11px 12px; }
.prow + .prow { border-top:1px solid #f0f2f7; }
.pdate { width:36px; flex:0 0 36px; text-align:center; }
.pdate b { display:block; font-size:14px; font-weight:800; line-height:1.1; color:var(--ink); }
.pdate span { font-size:9.5px; color:#98a0b3; font-weight:700; text-transform:uppercase; }
.pmid { flex:1; min-width:0; }
.pmid .pt { font-size:12.5px; font-weight:700; color:#2b3147; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pmid .pd { font-size:10.5px; color:#98a0b3; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pval { text-align:right; flex:0 0 auto; }
.pval b { font-size:15px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--ink); }
.pval .pdelta { display:inline-block; margin-top:2px; padding:2px 6px; font-size:9.5px; }
