:root {
  --navy: #0D202C;
  --navy-2: #16303f;
  --blue: #0150DA;
  --blue-d: #0141b0;
  --blue-l: #e8effd;
  --red: #EB1435;
  --red-d: #c80f2b;
  --red-l: #fde8eb;
  --ink: #0D202C;
  --muted: #5b6675;
  --line: #e3e7ee;
  --bg: #f4f6fa;
  --white: #fff;
  --ok: #0b8a4a;
  --ok-l: #e5f6ec;
  --warn: #b26b00;
  --warn-l: #fff4e0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 32, 44, .06), 0 6px 20px rgba(13, 32, 44, .06);
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt0 { margin-top: 0 } .mb0 { margin-bottom: 0 } .mt1 { margin-top: 1rem } .mt2 { margin-top: 2rem } .mb1 { margin-bottom: 1rem } .mb2 { margin-bottom: 2rem }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 700 .95rem/1 var(--head); padding: .95em 1.4em; border-radius: 10px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-d); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--navy); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-white:hover { border-color: #fff; }
.btn-sm { padding: .6em .9em; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 1.1em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.btn-danger-link { color: var(--red); }

/* ---------- chevrons (from the car wrap) ---------- */
.chevrons { display: inline-flex; gap: 6px; }
.chevrons i { width: 18px; height: 18px; background: var(--blue); clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%); }
.chevrons i.r { background: var(--red); }

/* ---------- public header ---------- */
.site-head { background: var(--navy); position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--blue); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #dfe6ef; text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: #fff; }
.site-nav .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 75px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; display: none; border-bottom: 3px solid var(--blue); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .btn { margin-top: 10px; }
  .brand img { height: 36px; }
}

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; top: -10%; bottom: -10%; width: 70px; transform: skewX(-24deg); }
.hero::before { right: 44%; background: var(--blue); opacity: .9; }
.hero::after { right: calc(44% + 78px); width: 26px; background: var(--red); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead { font-size: 1.15rem; color: #c9d4e0; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; color: #dfe6ef; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { color: var(--red); flex: none; }
.hero-img { position: relative; }
.hero-img img { height: auto; border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.35); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.hero-tag { position: absolute; left: -14px; bottom: 22px; background: #fff; color: var(--navy); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: 700; font-family: var(--head); display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.hero-tag b { color: var(--red); font-size: 1.3rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 48px; gap: 28px; }
  .hero::before { right: -20px; opacity: .5; } .hero::after { right: 60px; opacity: .6; }
  .hero-tag { left: 10px; }
}

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.eyebrow { font: 700 .78rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--red); display: inline-flex; gap: 10px; align-items: center; margin-bottom: 14px; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }

/* price cards */
.price { display: flex; flex-direction: column; position: relative; transition: transform .15s, box-shadow .15s; }
.price:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(13,32,44,.12); }
.price .tag { position: absolute; top: -12px; right: 18px; background: var(--red); color: #fff; font: 700 .72rem/1 var(--head); padding: 7px 10px; border-radius: 6px; letter-spacing: .04em; text-transform: uppercase; }
.price .amount { font: 800 2.4rem/1 var(--head); margin: 10px 0 2px; }
.price .per { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.price p { color: var(--muted); font-size: .95rem; flex: 1; }
.price.featured { border: 2px solid var(--blue); }

/* steps */
.step { display: flex; gap: 16px; }
.step .n { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; font: 800 1.2rem/46px var(--head); text-align: center; }
.step:nth-child(2) .n { background: var(--red); }
.step:nth-child(3) .n { background: var(--navy); }

/* features */
.feature .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-l); color: var(--blue); display: grid; place-items: center; margin-bottom: 14px; }

.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.about-img { border-radius: 18px; overflow: hidden; background: var(--navy); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0; }
.chips li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .92rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

.cta-band { background: var(--blue); color: #fff; border-radius: 22px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: 18%; top: -20%; bottom: -20%; width: 40px; background: var(--red); transform: skewX(-24deg); opacity: .9; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #dbe6ff; }
@media (max-width: 760px) { .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 24px; } }

.site-foot { background: var(--navy); color: #b9c5d2; padding: 48px 0 32px; margin-top: 0; font-size: .92rem; }
.site-foot a { color: #dfe6ef; text-decoration: none; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr; } }

/* ---------- booking flow ---------- */
.page { background: var(--bg); min-height: calc(100vh - 75px); padding: 32px 0 64px; }
.steps-bar { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: s; }
.steps-bar li { flex: 1; font-size: .8rem; font-weight: 600; color: var(--muted); border-top: 4px solid var(--line); padding-top: 8px; }
.steps-bar li.on { color: var(--ink); border-color: var(--blue); }
.steps-bar li.done { border-color: var(--navy); }
.book-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } .book-grid aside { order: -1; } }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: .95rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }

.service-pick { display: grid; gap: 14px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; color: inherit; }
.service-row:hover { border-color: var(--blue); }
.service-row .amount { font: 800 1.6rem/1 var(--head); white-space: nowrap; }

.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.datestrip a { flex: none; width: 70px; text-align: center; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 4px; scroll-snap-align: start; }
.datestrip a small { display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.datestrip a strong { display: block; font: 800 1.35rem/1.2 var(--head); }
.datestrip a span { display: block; font-size: .7rem; color: var(--ok); font-weight: 600; }
.datestrip a.none { opacity: .45; }
.datestrip a.none span { color: var(--muted); }
.datestrip a.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.datestrip a.on small, .datestrip a.on span { color: #dbe6ff; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slots button { font: 700 1rem var(--head); padding: 14px 6px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.slots button:hover { border-color: var(--blue); color: var(--blue); }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 600px) { .row2, .row3 { grid-template-columns: 1fr; } }
label.l, .l { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #cfd6e0; border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: 3px solid var(--blue-l); border-color: var(--blue); }
.has-error .input { border-color: var(--red); }
.err { color: var(--red); font-size: .85rem; margin-top: 4px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.seg { display: flex; flex-wrap: wrap; border: 1px solid #cfd6e0; border-radius: 10px; overflow: hidden; }
.seg label { flex: 1; text-align: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 12px 8px; font-weight: 700; font-size: .85rem; border-right: 1px solid #cfd6e0; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--blue); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--blue-l); }
.paybox { display: grid; gap: 10px; }
.paybox label { display: flex; gap: 12px; align-items: center; border: 1px solid #cfd6e0; border-radius: 12px; padding: 14px; cursor: pointer; }
.paybox input { accent-color: var(--blue); width: 20px; height: 20px; }
.paybox label:has(input:checked) { border-color: var(--blue); background: var(--blue-l); }

.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .95rem; border: 1px solid; }
.alert-ok { background: var(--ok-l); border-color: #bfe6cf; color: #075e33; }
.alert-error { background: var(--red-l); border-color: #f6c1ca; color: #8c0b20; }
.alert-info { background: var(--blue-l); border-color: #c7d7fa; color: #0d3a8f; }
.alert-warn { background: var(--warn-l); border-color: #f4dcae; color: #7a4a00; }

.badge { display: inline-block; font: 700 .72rem/1 var(--body); padding: 5px 8px; border-radius: 6px; background: #eef1f5; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.badge-booked { background: var(--blue-l); color: var(--blue); }
.badge-completed, .badge-paid { background: var(--ok-l); color: var(--ok); }
.badge-cancelled, .badge-no_show, .badge-expired { background: #f1f2f4; color: #7b8592; }
.badge-unpaid, .badge-pending { background: var(--warn-l); color: var(--warn); }
.badge-test { background: var(--red-l); color: var(--red); }
.badge-ss { background: #ede7fb; color: #5b3cc4; }
.badge-new { background: var(--ok-l); color: var(--ok); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a { font-weight: 600; text-decoration: none; }

.progress-bar { height: 10px; background: #e9edf3; border-radius: 99px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #3a7bff); border-radius: 99px; }
.skill { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.skill:last-child { border: 0; }
.dots { display: flex; gap: 4px; justify-content: flex-end; }
.dots i { width: 16px; height: 8px; border-radius: 4px; background: #e2e7ee; }
.dots i.on { background: var(--blue); }
.dots.l5 i.on { background: var(--ok); }

.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p) * 1%), #e6ebf2 0); display: grid; place-items: center; }
.ring > div { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 800 1.6rem var(--head); }

.lesson-card { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lesson-card:last-child { border-bottom: 0; }
.datebox { flex: none; width: 58px; text-align: center; border-radius: 12px; background: var(--navy); color: #fff; padding: 8px 4px; }
.datebox small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #9fb0c2; font-weight: 700; }
.datebox strong { display: block; font: 800 1.4rem/1.1 var(--head); }
.datebox.test { background: var(--red); }
.datebox.test small { color: #ffd0d8; }
.lesson-card .info { flex: 1; min-width: 0; }
.lesson-card .info strong { display: block; }
.lesson-card .info span { color: var(--muted); font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; }

.stat { padding: 18px 20px; }
.stat .v { font: 800 1.7rem/1.1 var(--head); }
.stat .k { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---------- admin ---------- */
.admin { background: var(--bg); min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.side { background: var(--navy); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 3px solid var(--blue); }
.side .brand img { height: 34px; margin: 4px 8px 24px; }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; color: #c3cfdb; text-decoration: none; font-weight: 600; font-size: .95rem; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: var(--blue); color: #fff; }
.side .foot { margin-top: auto; font-size: .85rem; color: #9fb0c2; padding: 8px; }
.side .foot a { color: #dfe6ef; }
.main { padding: 28px 32px 100px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.6rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { text-decoration: none; }
.tabbar { display: none; }
.mobile-top { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 16px 96px; }
  .mobile-top { display: flex; background: var(--navy); align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 3px solid var(--blue); position: sticky; top: 0; z-index: 40; }
  .mobile-top img { height: 30px; }
  .mobile-top a { color: #fff; font-size: .85rem; text-decoration: none; font-weight: 600; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; }
  .tabbar a.on { color: var(--blue); }
  .topbar h1 { font-size: 1.35rem; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.1rem; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: .93rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.subtabs a { padding: 10px 14px; font-weight: 700; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: .9rem; }
.subtabs a.on { color: var(--blue); border-color: var(--blue); }

/* week calendar */
.cal-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: 52px repeat(7, minmax(110px, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 860px; }
.cal-head { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 6px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); z-index: 2; }
.cal-head strong { display: block; font: 800 1.2rem var(--head); color: var(--ink); }
.cal-head.today strong { color: var(--blue); }
.cal-times { position: relative; }
.cal-times div { position: absolute; right: 6px; font-size: .72rem; color: var(--muted); transform: translateY(-50%); }
.cal-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), #eef1f5 calc(var(--hh) - 1px), #eef1f5 var(--hh)); }
.cal-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, #f6f7f9, #f6f7f9 6px, #eef0f3 6px, #eef0f3 12px); }
.cal-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 5px 7px; font-size: .76rem; line-height: 1.25; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--blue-l); border-left: 4px solid var(--blue); }
.cal-ev strong { display: block; font-size: .8rem; }
.cal-ev.ss { background: #f1ecfd; border-color: #6e4ad6; }
.cal-ev.test { background: var(--red-l); border-color: var(--red); }
.cal-ev.completed { opacity: .65; }
.cal-ev.pending { background: var(--warn-l); border-color: var(--warn); }
.cal-ev.block { background: #eceff3; border-color: #9aa5b1; color: var(--muted); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 12px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; background: var(--c); }

.avail-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.auth-box { max-width: 440px; margin: 0 auto; }
.login-page { min-height: 100vh; background: var(--navy); display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.login-page::before { content: ""; position: absolute; left: 12%; top: -10%; bottom: -10%; width: 60px; background: var(--blue); transform: skewX(-24deg); }
.login-page::after { content: ""; position: absolute; left: calc(12% - 40px); top: -10%; bottom: -10%; width: 22px; background: var(--red); transform: skewX(-24deg); }
.login-page .card { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.login-page .logo { height: 46px; margin: 0 auto 22px; position: relative; z-index: 1; }

.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal { max-width: 760px; }

/* layout safety: let grid children shrink so scrollers don't widen the page */
.book-grid > *, .cols > *, .grid > *, .main { min-width: 0; }
@media (max-width: 640px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 1.35rem; }
  .kv { grid-template-columns: 110px 1fr; }
  .summary dl { font-size: .9rem; }
}
.lesson-card .info span.badge { display: inline-block; }

/* ---------- recent passes ---------- */
.passes { background: var(--navy); position: relative; overflow: hidden; }
.passes::before { content: ""; position: absolute; left: -40px; top: -10%; bottom: -10%; width: 50px; background: var(--blue); transform: skewX(-24deg); opacity: .8; }
.passes .wrap { position: relative; }
.pass-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pass-grid .more { display: none; }
.pass-grid.all .more { display: block; }
.pass-card { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #1b3142; aspect-ratio: 3 / 4; display: block; transition: transform .15s; }
.pass-card:hover { transform: translateY(-3px); }
.pass-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pass-tag { position: absolute; left: 10px; bottom: 10px; background: var(--red); color: #fff; font: 800 .72rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px 7px 24px; border-radius: 6px; }
.pass-tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-70%) rotate(-45deg); }
@media (max-width: 860px) { .pass-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 560px) { .pass-grid { grid-template-columns: repeat(2, 1fr); } .pass-grid .more-m { display: none; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 520px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 14, 20, .85); }
.lightbox img { max-height: 88vh; width: auto; max-width: 100%; border-radius: 14px; margin: 0 auto; }
.lb-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); font-size: 1rem; cursor: pointer; }

/* ---------- timetable ---------- */
.timetable { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tt-day h3 { color: var(--blue); }
.tt-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tt-day li { font: 700 1rem var(--head); padding: 10px 12px; background: var(--bg); border-radius: 8px; border-left: 4px solid var(--red); }
@media (max-width: 960px) { .timetable { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .timetable { grid-template-columns: 1fr; } }

/* admin pass photos */
.pass-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pass-admin-item img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; border-radius: 10px; margin-bottom: 6px; }

/* slot status */
.slots button small { display: block; font: 600 .7rem/1.2 var(--body); color: var(--ok); margin-top: 4px; letter-spacing: .02em; }
.slots button.taken { cursor: not-allowed; background: #f3f4f7; color: #9aa3ae; border-style: dashed; }
.slots button.taken small { color: #9aa3ae; }
.slots button.taken.booked small { color: var(--red); }
.slots button.taken:hover { border-color: var(--line); color: #9aa3ae; }

/* calendar quick-create (Google-Calendar style) */
.cal-col { cursor: cell; user-select: none; -webkit-user-select: none; }
.cal-ev { cursor: pointer; z-index: 1; }
.cal-sel { position: absolute; left: 3px; right: 3px; border-radius: 8px; background: rgba(1, 80, 218, .18); border: 2px solid var(--blue); color: var(--blue); font: 700 .75rem var(--head); padding: 4px 6px; z-index: 2; pointer-events: none; }
.qc-back { position: fixed; inset: 0; background: rgba(13, 32, 44, .45); z-index: 90; }
.qc { position: fixed; z-index: 91; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(13, 32, 44, .3); padding: 20px; border-top: 5px solid var(--blue); }
.qc[hidden], .qc-back[hidden] { display: none; }
.qc-head { display: flex; justify-content: space-between; align-items: center; }
.qc-x { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 6px; }
.qc-when { font-weight: 700; color: var(--blue); margin-top: -6px; }
.qc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qc-chip { font: 700 .85rem var(--head); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); text-align: center; }
.qc-chip small { display: block; font: 600 .68rem var(--body); color: var(--ok); margin-top: 2px; }
.qc-chip:hover { border-color: var(--blue); }
.qc-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.qc-chip.on small { color: #dbe6ff; }
.qc-chip.taken { background: #f3f4f7; color: #9aa3ae; border-style: dashed; cursor: not-allowed; }
.qc-chip.taken small { color: var(--red); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 600px) { .qc { top: auto; bottom: 0; left: 0; transform: none; width: 100%; border-radius: 16px 16px 0 0; max-height: 88vh; } }
