:root {
  --bg: #F3F0E8;
  --bg-2: #ECE7DB;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --ink: #1C2117;
  --ink-2: #3A4033;
  --muted: #6F7366;
  --line: #E3DED1;
  --moss: #4D6A2E;
  --moss-d: #2C4119;
  --moss-l: #E2EAD3;
  --moss-xl: #F0F4E7;
  --sun: #F0D46A;
  --sun-l: #FBF1C8;
  --clay: #B9714A;
  --clay-l: #F6E4D8;
  --danger: #B4432F;
  --danger-l: #F8E1DB;
  --ok: #3E7A3A;
  --info: #3D6C86;
  --info-l: #E0ECF2;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --shadow: 0 1px 2px rgba(28,33,23,.04), 0 8px 24px -12px rgba(28,33,23,.12);
  --shadow-lg: 0 24px 60px -20px rgba(28,33,23,.28);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 72px;
  --wrap: 1240px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap-r { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- typography ---------- */
.display { font-size: clamp(44px, 7vw, 96px); font-weight: 200; letter-spacing: -0.045em; line-height: .98; }
.display b, .h1 b, .h2 b { font-weight: 700; }
.h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 300; letter-spacing: -0.04em; }
.h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 300; letter-spacing: -0.035em; }
.h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.h4 { font-size: 17px; font-weight: 600; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.num { font-weight: 200; font-size: 56px; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.num-sm { font-weight: 300; font-size: 34px; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 15px; transition: background .2s, transform .15s, border-color .2s, color .2s; white-space: nowrap; background: var(--surface); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--moss-d); }
.btn-moss { background: var(--moss); color: #fff; }
.btn-moss:hover { background: var(--moss-d); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #E7C54C; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-soft { background: var(--moss-l); color: var(--moss-d); }
.btn-soft:hover { background: #D3DFBF; }
.btn-danger { background: var(--danger-l); color: var(--danger); }
.btn-danger:hover { background: #F2CFC6; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .arrow { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; margin-right: -10px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.pill-dark { background: var(--ink); color: #fff; }
.pill-moss { background: var(--moss-l); color: var(--moss-d); }
.pill-sun { background: var(--sun-l); color: #6B5410; }
.pill-clay { background: var(--clay-l); color: #7A4024; }
.pill-danger { background: var(--danger-l); color: var(--danger); }
.pill-info { background: var(--info-l); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.btn svg, .pill svg, .glass-pill svg, .lbl svg, .row > svg, .chip svg { width: 18px; height: 18px; flex: none; }
.pill svg, .glass-pill svg { width: 14px; height: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(243,240,232,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.hdr-in { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; }
.logo svg { width: 172px; height: auto; display: block; }
.ftr .logo svg { width: 200px; }
.nav { display: flex; gap: 2px; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--ink); color: #fff; }
.hdr-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 0; box-shadow: var(--shadow); position: relative; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--clay); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; background: var(--moss); overflow: hidden; }
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }

/* ---------- mobile bottom nav ---------- */
.bnav { display: none; position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--ink); border-radius: 26px; padding: 6px; box-shadow: var(--shadow-lg); }
.bnav-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.bnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px; color: rgba(255,255,255,.62); font-size: 11px; font-weight: 600; }
.bnav a svg { width: 22px; height: 22px; }
.bnav a.on { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; margin: 8px 16px 0; border-radius: var(--r-xl); overflow: hidden; min-height: min(760px, calc(100vh - 90px)); display: flex; color: #fff; background: #2F3B22; }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media svg { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,14,.0) 30%, rgba(20,26,14,.55) 100%); pointer-events: none; }
.hero-in { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; width: 100%; gap: 28px; }
.hero h1 { white-space: pre-line; max-width: 12ch; }
.hero-sub { max-width: 520px; font-size: 18px; color: rgba(255,255,255,.86); }
.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-card { background: rgba(255,255,255,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-lg); padding: 18px 20px; min-width: 280px; }
.hero-card .row { color: #fff; }
.hero-top { position: absolute; z-index: 2; top: 28px; left: 48px; right: 48px; display: flex; justify-content: space-between; }
.glass-pill { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }

/* ---------- sections ---------- */
.sec { padding: 88px 0 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.sec-head .h2 { max-width: 16ch; }
.page-head { padding: 40px 0 28px; }
.page-head .h1 { max-width: 18ch; }

.card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border-radius: var(--r); padding: 20px; border: 1px solid var(--line); }
.card-tint { background: var(--surface-2); border-radius: var(--r); padding: 20px; }
.card h3 { margin-bottom: 4px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento > * { min-width: 0; }
.b-4 { grid-column: span 4; } .b-5 { grid-column: span 5; } .b-6 { grid-column: span 6; } .b-7 { grid-column: span 7; } .b-8 { grid-column: span 8; } .b-3 { grid-column: span 3; } .b-12 { grid-column: span 12; }

.philo { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.philo .quote { font-size: clamp(24px, 2.6vw, 34px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.25; }
.stat-card { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 180px; box-shadow: var(--shadow); }
.stat-card.sun { background: var(--sun); box-shadow: none; }
.stat-card.dark { background: var(--ink); color: #fff; box-shadow: none; }
.stat-card.moss { background: var(--moss); color: #fff; box-shadow: none; }
.stat-card .lbl { font-size: 14px; font-weight: 500; opacity: .75; }

/* direction cards */
.dir-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff; cursor: pointer; isolation: isolate; transition: transform .3s; }
.dir-card:hover { transform: translateY(-3px); }
.dir-card .art { position: absolute; inset: 0; z-index: -1; }
.dir-card .art svg { width: 100%; height: 100%; }
.dir-card .top { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; }
.dir-card h3 { font-size: 26px; font-weight: 600; }
.dir-card p { opacity: .85; font-size: 14px; margin-top: 6px; }
.dir-card .go { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }

/* class row */
.cls { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; background: var(--surface); border-radius: var(--r); transition: box-shadow .2s; }
.cls + .cls { margin-top: 8px; }
.cls:hover { box-shadow: var(--shadow); }
.cls .time { font-size: 26px; font-weight: 300; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.cls .time small { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0; font-weight: 500; }
.cls .ttl { font-weight: 600; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cls .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cls.off { opacity: .55; }
.seats { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seat-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.seat-bar i { display: block; height: 100%; background: var(--moss); border-radius: 3px; }

.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 64px; padding: 10px 0; border-radius: 18px; background: var(--surface); text-align: center; border: 1px solid transparent; }
.day b { display: block; font-size: 22px; font-weight: 300; letter-spacing: -0.03em; }
.day span { font-size: 12px; color: var(--muted); font-weight: 600; }
.day.on { background: var(--ink); color: #fff; }
.day.on span { color: rgba(255,255,255,.6); }
.day.today:not(.on) { border-color: var(--moss); }

/* teacher */
.tch { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tch .ph { aspect-ratio: 4/3.4; position: relative; display: grid; place-items: center; }
.tch .ph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tch .ph .ini { position: relative; font-size: 64px; font-weight: 200; color: #fff; letter-spacing: -0.04em; }
.tch .bd { padding: 18px 20px 20px; }

/* tariffs */
.tariff { background: var(--surface); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); position: relative; }
.tariff.feat { background: var(--ink); color: #fff; }
.tariff.feat .muted { color: rgba(255,255,255,.6); }
.tariff .price { font-size: 44px; font-weight: 200; letter-spacing: -0.05em; }
.tariff ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.tariff li { display: flex; gap: 8px; }
.tariff li::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--moss-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234D6A2E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; margin-top: 1px; }
.tariff.feat li::before { background-color: rgba(255,255,255,.14); }

/* reviews */
.rev { background: var(--surface); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.stars { color: #D5A72C; letter-spacing: 2px; font-size: 15px; }

/* news */
.news { border-radius: var(--r-lg); padding: 24px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; min-height: 220px; box-shadow: var(--shadow); }
.news.promo { background: var(--sun); box-shadow: none; }
.news.promo .muted { color: rgba(28,33,23,.62); }

/* photos */
.photos { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 16px; }
.photos > div { border-radius: var(--r-lg); overflow: hidden; }
.photos > div:first-child { grid-row: span 2; }
.photos svg { width: 100%; height: 100%; display: block; }

/* contacts */
.map { border-radius: var(--r-lg); overflow: hidden; min-height: 360px; background: var(--bg-2); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* footer */
.ftr { margin-top: 96px; background: var(--ink); color: #fff; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 56px 0 120px; }
.ftr a { color: rgba(255,255,255,.72); }
.ftr a:hover { color: #fff; }
.ftr .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ftr h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.5); margin-bottom: 14px; font-weight: 600; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.ftr .big { font-size: clamp(64px, 14vw, 200px); font-weight: 200; letter-spacing: -0.06em; line-height: .9; margin-top: 48px; color: rgba(255,255,255,.08); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl-s { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; transition: border-color .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px var(--moss-l); }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F7366' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat; padding-right: 40px; }
.input-sm { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--moss); flex: none; margin: 1px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.otp { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 300; }
.hp { position: absolute; left: -9999px; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0 40px; min-height: calc(100vh - var(--nav-h) - 40px); }
.auth-art { border-radius: var(--r-xl); overflow: hidden; position: relative; min-height: 520px; color: #fff; }
.auth-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art .txt { position: absolute; left: 36px; bottom: 36px; right: 36px; }
.auth-box { background: var(--surface); border-radius: var(--r-xl); padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-box form { max-width: 420px; width: 100%; }
.demo-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.demo-roles button { text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.demo-roles button:hover { border-color: var(--ink); }
.demo-roles b { display: block; font-size: 14px; }
.demo-roles span { font-size: 12px; color: var(--muted); }

/* ---------- app shell (кабинеты) ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; gap: 16px; padding: 8px 16px 40px; max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: calc(var(--nav-h) + 8px); align-self: start; background: var(--surface); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); max-height: calc(100vh - var(--nav-h) - 24px); overflow: auto; }
.side .who { display: flex; gap: 12px; align-items: center; padding: 6px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.side a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.side a:hover { background: var(--bg); }
.side a.on { background: var(--ink); color: #fff; }
.side a .cnt { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--clay); color: #fff; border-radius: 10px; padding: 1px 7px; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 14px 12px 6px; font-weight: 600; }
.main { min-width: 0; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 20px; }
.main-head .h1 { font-size: clamp(30px, 3.4vw, 44px); }
.subnav { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-height: 140px; justify-content: space-between; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.kpi.sun { background: var(--sun); box-shadow: none; }
.kpi.sun .lbl { color: rgba(28,33,23,.65); }
.kpi.dark { background: var(--ink); color: #fff; box-shadow: none; }
.kpi.dark .lbl { color: rgba(255,255,255,.6); }
.kpi.moss { background: var(--moss); color: #fff; box-shadow: none; }
.kpi.moss .lbl { color: rgba(255,255,255,.7); }

.panel { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-h h3 { font-size: 18px; font-weight: 600; }

.tbl-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }

.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 120px; height: 60px; margin: 0 auto 12px; opacity: .7; }

.sub-card { border-radius: var(--r-lg); padding: 22px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.sub-card.active { background: var(--moss); color: #fff; box-shadow: none; }
.sub-card.active .muted { color: rgba(255,255,255,.7); }
.sub-card.frozen { background: var(--info-l); box-shadow: none; }
.ring { width: 96px; height: 96px; flex: none; }
.progress { height: 8px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sun); border-radius: 4px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b i { width: 100%; max-width: 28px; border-radius: 8px 8px 4px 4px; background: var(--ink); min-height: 4px; position: relative; }
.bars .b i.alt { background: var(--sun); }
.bars .b span { font-size: 11px; color: var(--muted); font-weight: 600; }
.hbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 12px; align-items: center; font-size: 14px; padding: 6px 0; }
.hbar .tr { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.hbar .tr i { display: block; height: 100%; border-radius: 5px; }

.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; padding: 4px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 18px; background: var(--bg); font-size: 15px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.them { border-bottom-left-radius: 6px; }
.msg .xs { opacity: .6; margin-top: 4px; }

.notif { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif.unread .t { font-weight: 600; }
.notif .ic { width: 36px; height: 36px; border-radius: 12px; background: var(--moss-l); display: grid; place-items: center; flex: none; color: var(--moss-d); }
.notif .ic svg { width: 18px; height: 18px; }

/* calendar week */
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.week .col { background: var(--surface-2); border-radius: 18px; padding: 10px; min-height: 260px; }
.week .col h5 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; }
.week .col.today { background: var(--moss-xl); }
.ev { border-radius: 12px; padding: 8px 10px; background: var(--surface); font-size: 12px; margin-bottom: 6px; cursor: pointer; border-left: 3px solid var(--moss); }
.ev b { display: block; font-size: 13px; }
.ev.cx { opacity: .5; text-decoration: line-through; }

/* video */
.vid { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; }
.vid .th { aspect-ratio: 16/10; position: relative; }
.vid .th svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vid .th .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--ink); }
.vid .th .lock { background: rgba(28,33,23,.82); color: #fff; }
.vid .th .tags { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; justify-content: space-between; }
.vid .bd { padding: 16px 18px 18px; }
.player { aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #111; position: relative; color: #fff; display: grid; place-items: center; }
.player svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.player > div > svg { width: 36px; height: 36px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--bg); padding: 2px 6px; border-radius: 6px; }
.player .ctrl { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; gap: 12px; align-items: center; font-size: 12px; }
.player .ctrl .tr { flex: 1; height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; }
.player .ctrl .tr i { display: block; height: 100%; width: 0; background: var(--sun); border-radius: 2px; transition: width 1s linear; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(28,33,23,.42); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px; box-shadow: var(--shadow-lg); animation: rise .25s cubic-bezier(.2,.8,.2,1); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.modal-h .x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); display: grid; place-items: center; flex: none; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
#toast-root { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .25s; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--danger); }
.toast.ok::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C2117' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat; flex: none; }

.search-box { position: relative; }
.search-box input { padding-left: 46px; }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.sr-res a { display: flex; gap: 12px; padding: 12px; border-radius: 14px; align-items: center; }
.sr-res a:hover { background: var(--bg); }

.demo-bar { background: var(--ink); color: rgba(255,255,255,.8); font-size: 12px; text-align: center; padding: 6px 12px; }
.demo-bar a { color: var(--sun); font-weight: 600; text-decoration: underline; }
.demo-bar button { background: none; border: 0; color: var(--sun); font-weight: 600; text-decoration: underline; font-size: 12px; padding: 0; }

.reveal { animation: reveal .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 8px 10px; font-size: 13px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .bnav { display: block; }
  body { padding-bottom: 96px; }
  .shell { grid-template-columns: 1fr; padding: 0 16px 24px; }
  .side { display: none; }
  .subnav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 8px; padding: 4px 16px; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
  .subnav a.on { background: var(--ink); color: #fff; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > * { grid-column: span 6; }
  .philo { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; }
  .ftr .cols { grid-template-columns: 1fr 1fr; }
  .photos { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 160px 160px; }
  .photos > div:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hdr-in { gap: 10px; }
  .logo svg { width: 132px; }
  .hero { margin: 4px 8px 0; border-radius: 28px; min-height: calc(100svh - 170px); }
  .hero-in { padding: 24px 20px; gap: 20px; }
  .hero-top { left: 20px; right: 20px; top: 20px; }
  .hero-sub { font-size: 16px; }
  .hero-card { min-width: 0; width: 100%; }
  .hero-bottom .btn { width: 100%; }
  .sec { padding-top: 64px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .bento > * { grid-column: span 12; }
  .kpis { gap: 10px; }
  .kpi { padding: 16px; min-height: 120px; }
  .num { font-size: 42px; }
  .num-sm { font-size: 28px; }
  .cls { grid-template-columns: 64px 1fr; gap: 12px; padding: 16px; }
  .cls .time { font-size: 22px; }
  .cls .act { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .cls .act .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 28px 20px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 28px 28px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; }
  .modal-f .btn { flex: 1; }
  .ftr .cols { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 96px 1fr 44px; }
  .panel { padding: 18px; }
  .tbl-wrap { margin: 0 -18px; padding: 0 18px; }
  .tariff .price { font-size: 38px; }
  .dir-card { min-height: 240px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
