/* Сторінки учня (вхід, розклад, кабінет). Підключається після home.css */
.page { padding-top: 28px; padding-bottom: 64px; }
.page h1 { font-size: clamp(32px, 9vw, 48px); line-height: 1.08; margin-bottom: 10px; }
.page .sub { font-size: 17px; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.coin-pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-weight: 800; font-size: 15px; min-height: 40px; white-space: nowrap; }
.coin-pill small { font-weight: 600; color: var(--muted); font-size: 13px; }
@media (max-width: 380px) { .coin-pill small { display: none; } }

/* Картки та форми */
.box { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.box h2 { font-size: 22px; margin-bottom: 10px; }
.box > p:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.field small { font-weight: 500; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea, .inp {
  font: inherit; font-weight: 500; font-size: 17px; color: var(--ink); background: #fff; width: 100%;
  border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 54px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px #DCE6FF; }
.tick { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.45; margin: 0 0 14px; cursor: pointer; }
.tick input { width: 24px; height: 24px; margin: 0; accent-color: var(--blue); }
.btn { font-family: inherit; cursor: pointer; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.btn.small { min-height: 46px; padding: 8px 18px; font-size: 16px; }
.btn.pink { background: var(--pink); border-color: var(--pink); }
.btn.outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.outline:hover { color: var(--ink); border-color: var(--blue); box-shadow: none; }
.linkbtn { font: inherit; font-weight: 700; color: var(--blue); background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer; }
.err { color: #9B1C1C; background: #FDECEC; padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; margin: 0 0 14px; }
.ok-msg { color: #1E7A43; background: #E3F4E9; padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; margin: 0 0 14px; }
.note { background: #EAF0FF; color: #1D45A8; border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.note.pink { background: var(--pink-soft); color: #A3194D; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Перемикач Вхід / Реєстрація */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #E7ECFA; border-radius: 999px; padding: 4px; margin: 0 0 18px; }
.seg button { font: inherit; font-weight: 800; font-size: 16px; border: 0; border-radius: 999px; min-height: 48px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 4px 14px -6px rgba(26, 29, 58, .3); }
.ref-card { display: flex; gap: 12px; align-items: center; background: var(--pink-soft); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; font-size: 15px; }

/* Аватари */
.ava { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--blue) center / cover; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.ava.big { width: 56px; height: 56px; flex-basis: 56px; font-size: 18px; }

/* Розклад: дні */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -20px 6px; padding-left: 20px; padding-right: 20px;
  scroll-snap-type: x proximity; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.daybtn { flex: 0 0 62px; scroll-snap-align: start; font: inherit; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 18px;
  min-height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; position: relative; }
.daybtn b { font-size: 22px; line-height: 1.1; }
.daybtn span { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.daybtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.daybtn[aria-pressed="true"] span { color: #C9CDF0; }
.daybtn .dotn { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.daybtn.none { opacity: .55; }

.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 10px; padding: 2px 20px 8px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: 0 0 auto; font: inherit; font-weight: 700; font-size: 15px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.fchip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.frow select { font: inherit; font-weight: 600; font-size: 16px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 50px; background: #fff; color: var(--ink); width: 100%; }

/* Картка заняття */
.list { display: flex; flex-direction: column; gap: 12px; }
.lesson { background: #fff; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 2px solid transparent; }
.lesson.mine { border-color: #9BE0B5; }
.lesson.hl { border-color: var(--pink); }
.l-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.l-time { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 22px; line-height: 1.1; min-width: 70px; }
.l-time small { display: block; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.l-type { font-weight: 800; font-size: 19px; line-height: 1.25; display: block; }
.l-dir { color: var(--muted); font-size: 14px; font-weight: 600; }
.l-trainer { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); min-height: 44px; }
.l-trainer b { display: block; font-size: 16px; }
.l-trainer span.m { color: var(--muted); font-size: 13px; font-weight: 600; }
.l-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid #EDF1FB; padding-top: 12px; }
.price { font-weight: 800; font-size: 18px; }
.price s { color: var(--muted); font-weight: 600; margin-right: 6px; font-size: 15px; }
.price .free { color: var(--pink); }
.seats { color: var(--muted); font-size: 14px; font-weight: 600; display: block; }
.seats.low { color: #B4540A; }
.tagok { display: inline-flex; align-items: center; background: #E3F4E9; color: #1E7A43; font-weight: 800; border-radius: 999px; padding: 8px 16px; min-height: 44px; }
.tagno { display: inline-flex; align-items: center; background: #F1F3F8; color: var(--muted); font-weight: 800; border-radius: 999px; padding: 8px 16px; min-height: 44px; }
.empty-box { background: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--muted); }
.empty-box b { display: block; color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* Діалог підтвердження */
dialog.sheet { border: 0; padding: 0; border-radius: 26px; width: min(520px, calc(100% - 24px)); background: #fff; color: var(--ink); }
dialog.sheet::backdrop { background: rgba(26, 29, 58, .5); }
.sheet-in { padding: 24px 20px 20px; }
.sheet-in h2 { font-size: 24px; margin-bottom: 6px; }
.sheet-in dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 16px; }
.sheet-in dt { color: var(--muted); }
.sheet-in dd { margin: 0; font-weight: 700; }
.sheet-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* Кабінет учня */
.wallet { background: linear-gradient(135deg, var(--blue), #6A4BF0); color: #fff; border-radius: 26px; padding: 22px 20px; margin-bottom: 14px; }
.wallet .lbl { font-weight: 700; opacity: .85; }
.wallet .sum { font-family: Unbounded, sans-serif; font-weight: 800; font-size: clamp(40px, 12vw, 56px); line-height: 1.05; margin: 4px 0; }
.wallet .sum small { font-size: 18px; font-family: Manrope, sans-serif; font-weight: 700; opacity: .85; }
.wallet p { margin: 6px 0 0; font-size: 15px; opacity: .92; }
.wallet .freebadge { display: inline-block; margin-top: 12px; background: #fff; color: var(--pink); font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.tabs2 { display: flex; gap: 8px; overflow-x: auto; margin: 4px -20px 14px; padding: 2px 20px 6px; scrollbar-width: none; position: sticky; top: 64px; z-index: 5; background: var(--bg); }
.tabs2::-webkit-scrollbar { display: none; }
.packs2 { display: flex; flex-direction: column; gap: 10px; }
.pk { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; background: var(--bg); border-radius: 16px; padding: 14px 16px; }
.pk b { font-size: 18px; }
.pk .s { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 20px; grid-row: span 2; }
.pk span.h { color: var(--muted); font-size: 14px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EDF1FB; font-size: 15px; }
.hist li:last-child { border-bottom: 0; }
.hist .plus { color: #1E7A43; font-weight: 800; white-space: nowrap; }
.hist .minus { color: var(--ink); font-weight: 800; white-space: nowrap; }
.stars { display: flex; gap: 4px; }
.stars button { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: #D3D8E8; min-width: 44px; min-height: 44px; padding: 0; }
.stars button.on { color: #FFB020; }
.rev { background: var(--bg); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fav { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EDF1FB; text-decoration: none; color: var(--ink); min-height: 64px; }
.fav:last-child { border-bottom: 0; }
.fav b { display: block; }
.fav span.m { color: var(--muted); font-size: 14px; }
.st-pill { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: #F1F3F8; color: var(--muted); }
.st-pill.live { background: #FFE6F0; color: #A3194D; }
.st-pill.ok { background: #E3F4E9; color: #1E7A43; }
.actions2 { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px;
  font-weight: 700; max-width: calc(100% - 32px); z-index: 50; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5); }
.legal h2 { font-size: 22px; margin: 26px 0 8px; }
.legal p, .legal li { color: #2B2F4F; }
.legal table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #EDF1FB; vertical-align: top; }
.legal mark { background: #FFF3C4; border-radius: 4px; padding: 0 3px; }
.legal h1 { font-size: clamp(28px, 7vw, 40px); }
.nav-user .nav-login { font-weight: 800; font-size: 15px; text-decoration: none; padding: 9px 14px; min-height: 42px; display: inline-flex; align-items: center; border-radius: 12px; white-space: nowrap; }
@media (max-width: 400px) { .nav .logo { font-size: 15px; } .nav { padding: 10px 14px; } .coin-pill { padding: 6px 10px; } }
[hidden] { display: none !important; }
a.fchip { text-decoration: none; display: inline-flex; align-items: center; }
