/* Ascend Education — общий стиль сайта
   Палитра взята из логотипа: бордо + тёмно-синий + золото. */

/* assets/fonts — шрифты сайта (Manrope, Oswald; лицензия OFL) лежат у нас: без запросов к Google, страница рисуется быстрее.
   Только кириллица и латиница; браузер скачивает лишь нужные по unicode-range. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/oswald-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/oswald-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/oswald-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/oswald-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/oswald-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/oswald-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/oswald-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/oswald-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Казахская версия (html lang="kk", assets/js/i18n.js): основной текст — Onest (OFL). В Manrope нет казахских
   Ә Ғ Қ Ң Ұ, а буквы из другого шрифта посреди слова заметны — поэтому весь текст одним шрифтом, где есть все буквы.
   Заголовки — Oswald: в нём казахские буквы есть. Русская версия — Manrope, как была. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Редкое казахское имя на русской странице («Нұршат» в отзывах) — эти 5 букв тоже из Onest, а не системным шрифтом */
@font-face { font-family: 'Manrope KK'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0492-0493, U+049A-049B, U+04A2-04A3, U+04B0-04B1, U+04D8-04D9; }


:root {
  --maroon-950: #1c050b;
  --maroon-900: #2a0710;
  --maroon-800: #420c1a;
  --maroon-700: #631227;
  --red: #c8202f;
  --red-soft: #fde8ea;
  --navy: #1f2b5c;
  --navy-soft: #e9ecf7;
  --gold: #f2bf4b;
  --gold-light: #ffe39a;
  --gold-dark: #b8861b;
  --orange: #ef7a1d;
  --cream: #fbf6ef;
  --paper: #ffffff;
  --ink: #1e1416;
  --text: #3d3235;
  --muted: #76696c;
  --line: #ebe2dc;
  --green: #1f9d55;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(42, 7, 16, .25);
  --shadow-lg: 0 30px 60px -20px rgba(42, 7, 16, .35);
  --container: 1200px;
  --header-h: 72px;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font: 'Manrope', 'Manrope KK', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html[lang='kk'] { --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
/* Китайская версия: латиница и цифры — нашими шрифтами, иероглифы — системным китайским шрифтом (Windows, macOS, Android) */
/* Только буквы, цифры и простая пунктуация (U+0000–00FF): «——», кавычки “ ” и прочие знаки — из китайского шрифта,
   иначе китайское длинное тире из латинского шрифта рвётся на два дефиса */
@font-face { font-family: 'Manrope Basic'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Oswald Basic'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/oswald-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }
html:lang(zh) {
  --font: 'Manrope Basic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  --font-display: 'Oswald Basic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif;
}
html:lang(zh) h1, html:lang(zh) h2 { letter-spacing: .02em; }

*, *::before, *::after { box-sizing: border-box; }
/* Атрибут hidden всегда скрывает элемент, даже если у него свой display (grid, flex) */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 48px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--paper); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; text-transform: uppercase; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--cream { background: var(--cream); }
.section--dark { background: radial-gradient(1200px 600px at 85% -10%, rgba(239, 122, 29, .35), transparent 60%), linear-gradient(160deg, var(--maroon-800), var(--maroon-950)); color: #f3e7e9; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; }
.section--dark .eyebrow { color: var(--gold); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.section--dark .section-head p { color: #d8c5c9; }
.hl { color: var(--red); }
.section--dark .hl, .hero .hl { color: var(--gold); }

/* ---------- Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 28px; border-radius: 999px; font-weight: 800; font-size: 1rem; text-decoration: none; border: 2px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--maroon-900); box-shadow: 0 10px 24px -10px rgba(242, 191, 75, .9); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(200, 32, 47, .8); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--ink); }
.btn--wa { background: #25d366; color: #fff; }
.btn--green { background: var(--green); color: #fff; box-shadow: 0 10px 24px -10px rgba(31, 157, 85, .8); }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Верхняя «китайская» строка */
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(31, 157, 85, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }

/* ---------- Шапка */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .3); }
.header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img:first-child { width: 42px; height: 42px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text img { width: 118px; height: auto; }
.logo__text small { font-size: .68rem; color: var(--muted); font-weight: 600; margin-top: 3px; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { white-space: nowrap; position: relative; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .93rem; color: var(--text); transition: background .15s, color .15s; }
.nav a:hover { background: var(--cream); color: var(--ink); }
.nav a[aria-current='page'] { color: var(--red); }
.nav a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--red); border-radius: 2px; }
.header__cta { display: flex; align-items: center; gap: 16px; flex: none; }
.header__phone { font-weight: 800; text-decoration: none; color: var(--ink); font-size: .95rem; }
.header__phone small { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
/* Язык сайта: «Қаз | Рус | 中文» (assets/js/i18n.js). Пока казахский перевод не применён — страница скрыта, без мелькания русского */
.lang-switch { display: inline-flex; flex: none; padding: 3px; background: var(--cream); border-radius: 999px; }
.lang-switch button { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 800; line-height: 1.2; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed='true'] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(42, 7, 16, .15); cursor: default; }
.lang-switch button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
html.i18n-on:not(.i18n-ready) body { visibility: hidden; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: var(--cream); border-radius: 12px; margin-left: auto; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; content: ''; transition: transform .2s, top .2s, opacity .2s; }
.burger span { top: 21px; }
.burger span::before { top: -7px; left: 0; right: 0; }
.burger span::after { top: 7px; left: 0; right: 0; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { top: 0; transform: rotate(45deg); }
.menu-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero главной */
.hero { position: relative; color: #fff; background: radial-gradient(900px 500px at 10% 110%, rgba(239, 122, 29, .55), transparent 60%), radial-gradient(700px 500px at 100% 0%, rgba(200, 32, 47, .45), transparent 60%), linear-gradient(150deg, var(--maroon-800) 0%, var(--maroon-950) 70%); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: url('../img/pattern.svg'); background-size: 340px; opacity: .06; pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero__lead { font-size: 1.2rem; color: #ecdadd; max-width: 590px; margin-bottom: 30px; }
.hero__lead b { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.hero__badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: .88rem; font-weight: 600; margin-bottom: 24px; background: rgba(255, 255, 255, .05); }
.hero__badge i { font-style: normal; background: var(--gold); color: var(--maroon-900); border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: .78rem; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 620px; }
.trust div { padding: 14px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.trust b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--gold); line-height: 1.1; font-weight: 600; }
.trust span { font-size: .78rem; color: #dcc8cc; line-height: 1.3; display: block; }
.hero__visual { position: relative; }
.hero__photo { position: relative; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #fbe3e3, #f6c7c3); aspect-ratio: 4 / 4.6; box-shadow: var(--shadow-lg); }
.hero__photo img { position: absolute; bottom: 0; right: -6%; height: 100%; width: auto; max-width: none; }
.hero__photo::after { content: '学'; position: absolute; top: 14px; left: 22px; font-size: 9rem; font-weight: 900; color: rgba(200, 32, 47, .12); line-height: 1; font-family: serif; }
.review-chip { position: absolute; left: -28px; bottom: 28px; display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; background: #fff; color: var(--ink); border-radius: 18px; box-shadow: var(--shadow-lg); border: 0; text-align: left; max-width: 300px; }
.review-chip:hover .play { transform: scale(1.08); }
.review-chip small { display: block; color: var(--red); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.review-chip b { display: block; font-size: 1rem; }
.review-chip > span:last-child span { font-size: .82rem; color: var(--muted); line-height: 1.3; display: block; }
.flag { display: inline-block; width: 1.35em; height: .9em; border-radius: 2px; background: center / cover no-repeat; vertical-align: -.08em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.flag--cn { background-image: url('../img/flag-cn.svg'); }
.flag--kz { background-image: url('../img/flag-kz.svg'); }
h2 .flag { width: .9em; height: .6em; vertical-align: .08em; }
.play { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--red); display: grid; place-items: center; transition: transform .15s; }
.play::after { content: ''; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }

/* ---------- Внутренние hero */
.page-hero { position: relative; color: #fff; background: radial-gradient(800px 420px at 90% 0%, rgba(239, 122, 29, .45), transparent 60%), linear-gradient(150deg, var(--maroon-800), var(--maroon-950)); overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background-image: url('../img/pattern.svg'); background-size: 340px; opacity: .06; }
.page-hero .container { position: relative; padding-top: 64px; padding-bottom: 64px; }
.page-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 860px; }
.page-hero p { font-size: 1.15rem; color: #ecdadd; max-width: 720px; }
.crumbs { font-size: .85rem; color: #cdb5ba; margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; }

/* ---------- «Коротко о нас» */
.about-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); margin-top: -48px; position: relative; z-index: 2; }
.about-strip > div { padding: 30px 30px 28px; border-right: 1px solid var(--line); }
.about-strip > div:last-child { border-right: 0; }
.about-strip h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.about-strip p { margin: 0; color: var(--text); }
.about-strip--4 { grid-template-columns: repeat(4, 1fr); }
.about-strip--4 > div { padding: 24px 22px; }
.about-strip .num { font-family: var(--font-display); font-size: 1.1rem; width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); display: grid; place-items: center; color: var(--red); flex: none; }

/* ---------- Карточки */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); margin: 0; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: .94rem; }
.card li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--gold); transform: rotate(45deg); }
.card__icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 18px; }
.card__icon svg { width: 28px; height: 28px; }
.card--dark { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); color: #e8d6da; }
.card--dark p { color: #cfb9be; }
.card--dark:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Программы */
.program { display: flex; flex-direction: column; }
.program__tag { align-self: flex-start; font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.program dl { margin: 16px 0 20px; display: grid; gap: 8px; font-size: .92rem; }
.program dl div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.program dt { color: var(--muted); }
.program dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.program .btn { margin-top: auto; }
.program--featured { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaf0, #fff); }
.program--featured::before { content: 'Чаще всего выбирают'; position: absolute; top: -13px; left: 24px; background: var(--gold); color: var(--maroon-900); font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* ---------- Табы «Кто вы» */

/* ---------- Шаги */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps--5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps--5 .step { padding: 24px 20px; }
.process-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 32px; padding: 22px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.process-cta p { margin: 0; max-width: 680px; }
.process-cta b { color: var(--ink); }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 2.6rem; color: var(--red); opacity: .9; line-height: 1; display: block; margin-bottom: 14px; font-weight: 600; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.step__time { display: inline-block; margin-top: 14px; font-size: .78rem; font-weight: 800; color: var(--navy); background: var(--navy-soft); padding: 4px 10px; border-radius: 999px; }

/* ---------- Календарь приёма */
.note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-radius: 16px; background: var(--red-soft); color: var(--maroon-800); margin-top: 36px; }
.note b { color: var(--maroon-900); }
.note--gold { background: #fff6dc; color: #6d4c09; }
.note--navy { background: var(--navy-soft); color: var(--navy); }
.note svg { flex: none; width: 24px; height: 24px; margin-top: 2px; }

/* ---------- Отзывы */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.review { border: 0; padding: 0; background: none; text-align: left; color: inherit; }
.review__thumb { position: relative; aspect-ratio: 9 / 14; border-radius: 18px; overflow: hidden; background: var(--maroon-800); }
.review__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.review:hover img { transform: scale(1.05); }
.review__thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(28, 5, 11, .9)); }
.review__thumb .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; }
.review:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.review__meta { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff; }
.review__meta b { display: block; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; }
.review__meta span { font-size: .82rem; color: #f0dfe2; line-height: 1.3; display: block; }


/* ---------- Основатель */
.founder { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.founder__img { position: relative; border-radius: 28px; overflow: hidden; background: linear-gradient(160deg, var(--cream), #f3e4d4); aspect-ratio: 1 / 1; }
.founder__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.founder blockquote { margin: 0 0 24px; font-size: 1.25rem; line-height: 1.5; color: var(--ink); font-weight: 600; padding-left: 20px; border-left: 4px solid var(--gold); }

/* ---------- Блок «Китай сейчас» на главной */

/* ---------- FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: transparent; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; font-weight: 800; color: var(--ink); position: relative; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 22px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8202f' stroke-width='3'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 24px 22px; color: var(--text); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Форма заявки */
.apply { position: relative; background: radial-gradient(800px 500px at 0% 100%, rgba(239, 122, 29, .45), transparent 60%), linear-gradient(150deg, var(--maroon-800), var(--maroon-950)); color: #f3e7e9; overflow: hidden; }
.apply::before { content: ''; position: absolute; inset: 0; background-image: url('../img/pattern.svg'); background-size: 340px; opacity: .05; }
.apply .container { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.apply h2 { color: #fff; }
.apply__lead { font-size: 1.1rem; color: #e1ccd0; }
.next-steps { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 14px; counter-reset: ns; }
.next-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.next-steps li::before { counter-increment: ns; content: counter(ns); width: 40px; height: 40px; border-radius: 50%; background: rgba(242, 191, 75, .15); color: var(--gold); display: grid; place-items: center; font-weight: 900; }
.next-steps b { color: #fff; display: block; }
.next-steps span { font-size: .92rem; color: #cfb9be; }
.contacts-alt { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts-alt a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); text-decoration: none; font-weight: 700; font-size: .9rem; color: #fff; }
.contacts-alt a:hover { background: rgba(255, 255, 255, .14); }
.contacts-alt svg { width: 18px; height: 18px; }

.form { background: #fff; color: var(--text); border-radius: 24px; padding: 34px; box-shadow: var(--shadow-lg); }
.form h3 { font-size: 1.4rem; margin-bottom: 4px; }
.form__sub { color: var(--muted); font-size: .94rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 7px; color: var(--ink); }
.field input[type='text'], .field input[type='tel'], .field select, .field textarea { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(242, 191, 75, .25); }
.field.is-invalid input { border-color: var(--red); }
.field__err { display: none; color: var(--red); font-size: .8rem; margin-top: 5px; font-weight: 600; }
.field.is-invalid .field__err { display: block; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .9rem; transition: all .15s; }
.choice input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin: 6px 0 18px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.consent a { color: var(--ink); }
.consent.is-invalid { color: var(--red); }
.form__hint { text-align: center; font-size: .8rem; color: var(--muted); margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; }
.form__success { text-align: center; padding: 20px 0; }
.form__success .ok { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: #e7f6ed; color: var(--green); display: grid; place-items: center; }
.form__success .ok svg { width: 36px; height: 36px; }
.form__success p { color: var(--muted); }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Футер */
.footer { background: var(--maroon-950); color: #bfa9ae; padding: 64px 0 28px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer .logo__text small { color: #a8939a; }
.footer .logo__text img { filter: brightness(0) invert(1); }
.footer__about { margin-top: 16px; max-width: 320px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; }

/* ---------- Плавающие кнопки */
.fab-wa { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .7); transition: transform .2s; }
.fab-wa:hover { transform: scale(1.08); }
.fab-wa svg { width: 32px; height: 32px; color: #fff; }
.fab-wa::after { content: 'Ответим в WhatsApp'; position: absolute; right: 72px; white-space: nowrap; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; opacity: 0; transform: translateX(8px); transition: all .2s; pointer-events: none; }
.fab-wa:hover::after { opacity: 1; transform: none; }
.mobile-cta { display: none; }

/* ---------- Модалка видео */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(15, 3, 6, .85); padding: 20px; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box { position: relative; width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: 86vh; border-radius: 18px; overflow: hidden; background: #000; }
.modal__box iframe { width: 100%; height: 100%; border: 0; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; line-height: 1; color: var(--ink); }

/* ---------- Страница «Китай сегодня» */
.dash { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin-top: -56px; position: relative; z-index: 2; }
.panel { background: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.panel h3 { display: flex; align-items: center; gap: 10px; }
.panel__sub { color: var(--muted); font-size: .9rem; margin-top: -4px; margin-bottom: 18px; }
.clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.clock { padding: 22px; border-radius: 18px; background: var(--cream); }
.clock--cn { background: linear-gradient(160deg, var(--red), var(--maroon-800)); color: #fff; }
.clock small { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.clock b { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; margin: 8px 0 6px; font-variant-numeric: tabular-nums; font-weight: 500; }
.clock span { font-size: .9rem; opacity: .85; }
.status-line { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--cream); font-size: .86rem; font-weight: 700; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.is-on i { background: var(--green); }
.pill.is-off i { background: var(--red); }

.fx { display: grid; gap: 12px; }
.fx__rates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fx__rate { padding: 16px; border-radius: 16px; background: var(--cream); }
.fx__rate b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.fx__rate small { color: var(--muted); font-size: .8rem; }
.panel .converter { margin-bottom: 12px; }
.panel__sub b { color: var(--ink); font-size: 1.15rem; }
.converter { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; margin-top: 4px; }
.converter label { font-size: .8rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; }
.converter input { width: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.converter input:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(242, 191, 75, .25); }
.converter__eq { padding-bottom: 14px; font-weight: 900; color: var(--muted); }
.fx__src { font-size: .75rem; color: var(--muted); margin: 0; }

.weather { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wcard { border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wcard[aria-pressed='true'] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.wcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.wcard__city { font-weight: 800; color: var(--ink); line-height: 1.2; }
.wcard__city small { display: block; color: var(--muted); font-weight: 600; font-size: .76rem; }
.wcard__ico { font-size: 1.8rem; line-height: 1; }
.wcard__t { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); line-height: 1.1; margin-top: 8px; font-weight: 500; }
.wcard__d { font-size: .82rem; color: var(--muted); }
.wcard__tag { display: inline-block; font-size: .68rem; font-weight: 800; background: #fff6dc; color: #8a6210; padding: 2px 7px; border-radius: 6px; margin-top: 8px; }
.forecast { margin-top: 18px; padding: 22px; border-radius: 18px; background: var(--cream); }
.forecast__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.forecast__head h4 { margin: 0; }
.forecast__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.fday { background: #fff; border-radius: 14px; padding: 12px 6px; text-align: center; font-size: .82rem; }
.fday b { display: block; color: var(--ink); }
.fday span { font-size: 1.5rem; display: block; margin: 4px 0; }
.forecast__tip { margin: 14px 0 0; font-size: .9rem; color: var(--maroon-800); }

.skeleton { background: linear-gradient(90deg, #f2ebe6 25%, #faf6f2 50%, #f2ebe6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Новости */
.news-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.news-head .section-head { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { border: 1.5px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--text); }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { display: flex; flex-direction: column; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; min-height: 190px; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.news-card:hover h3 { color: var(--red); }
.news-card__meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.news-card__tag { font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--red-soft); color: var(--red); }
.news-card__tag[data-tag='visa'], .news-card__tag[data-tag='admission'] { background: var(--navy-soft); color: var(--navy); }
.news-card__tag[data-tag='travel'], .news-card__tag[data-tag='hsk'] { background: #fff1dc; color: #9a5a00; }
.news-card__tag[data-tag='life'], .news-card__tag[data-tag='grants'] { background: #e7f6ed; color: #17703d; }
.news-card__tag[data-tag='pinned'] { background: var(--gold); color: var(--maroon-900); }
.news-card h3 { font-size: 1.02rem; line-height: 1.4; margin: 0 0 14px; transition: color .15s; font-weight: 700; }
.news-card__src { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; color: var(--text); }
.news-card__src img { width: 16px; height: 16px; border-radius: 4px; }
.news-card__src::after { content: '↗'; margin-left: auto; color: var(--muted); }
.news-more { text-align: center; margin-top: 28px; }
.news-empty { grid-column: 1 / -1; padding: 40px; text-align: center; border: 2px dashed var(--line); border-radius: 18px; color: var(--muted); }
.news-foot { font-size: .8rem; color: var(--muted); margin-top: 18px; text-align: center; }

/* ---------- Информационные блоки */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; }
.info h3 { display: flex; gap: 10px; align-items: center; }
.info h3 span { font-size: 1.4rem; }
.info p, .info li { font-size: .94rem; }
.info ul { padding-left: 18px; margin: 0; }
.info li { margin-bottom: 6px; }
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.apps div { padding: 12px; border-radius: 12px; background: var(--cream); font-size: .86rem; line-height: 1.35; }
.apps b { display: block; color: var(--ink); }
.emerg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.emerg div { padding: 14px; border-radius: 14px; background: var(--red-soft); text-align: center; }
.emerg b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--red); line-height: 1; font-weight: 600; }
.emerg span { font-size: .82rem; color: var(--maroon-800); font-weight: 700; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--cream); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td b { color: var(--ink); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; color: var(--ink); }
tfoot td { background: #fff6dc; font-weight: 800; color: var(--ink); }


.hsk { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hsk div { padding: 16px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-align: center; }
.hsk b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); font-weight: 600; }
.hsk small { display: block; font-weight: 800; color: var(--ink); font-size: .82rem; }
.hsk span { font-size: .78rem; color: var(--muted); line-height: 1.35; display: block; margin-top: 6px; }
.hsk--3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.hsk--3 div { padding: 22px 12px; }
.hsk--3 b { font-size: 2rem; }
.hsk .is-key { border: 2px solid var(--gold); background: #fffaf0; }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 1px; flex: none; }
.check b { display: block; color: var(--ink); font-size: .95rem; }
.check span { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.check:has(input:checked) { border-color: var(--green); background: #f3fbf6; }
.check:has(input:checked) b { text-decoration: line-through; text-decoration-color: rgba(31, 157, 85, .6); }
.progress { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.progress__bar { flex: 1; height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.progress__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 10px; transition: width .3s; }
.progress b { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }

.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.links a { display: block; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; text-decoration: none; transition: border-color .15s; }
.links a:hover { border-color: var(--ink); }
.links b { display: block; color: var(--ink); }
.links span { font-size: .84rem; color: var(--muted); }

.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 36px; border-radius: 24px; background: linear-gradient(120deg, var(--gold-light), var(--gold)); color: var(--maroon-900); margin-top: 48px; flex-wrap: wrap; }
.cta-band h3 { margin: 0 0 4px; font-size: 1.4rem; color: var(--maroon-900); }
.cta-band p { margin: 0; font-weight: 600; }
.cta-band .btn--red { background: var(--maroon-900); box-shadow: none; }

.prose { max-width: 820px; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }

/* ---------- Анимация появления */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- Адаптив */
@media (max-width: 1140px) {
  .nav a { padding: 8px 9px; font-size: .88rem; }
  .header__phone { display: none; }
}
/* Меню прячется в бургер, как только перестаёт помещаться в одну строку */
@media (max-width: 1120px) {
  .header__login { display: none; }
  .burger { display: block; }
  .header__cta { display: none; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; flex-direction: column; gap: 0; padding: 12px 20px 100px; background: #fff; transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; overflow-y: auto; margin: 0; }
  .menu-open .nav { visibility: visible; }
  .header { backdrop-filter: none; background: #fff; }
  .nav { top: 0; z-index: -1; padding-top: calc(var(--header-h) + 50px); }
  .nav .btn { border: 0; border-radius: 999px; padding: 15px 20px; font-size: 1rem; justify-content: center; color: #fff; }
  .nav .btn--outline { border: 2px solid var(--line); color: var(--ink); }
  .menu-open .mobile-cta, .menu-open .fab-wa { display: none; }
  .menu-open .nav { transform: none; }
  .nav a { padding: 16px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current='page']::after { display: none; }
  .nav__mobile-extra { display: grid !important; gap: 10px; margin-top: 20px; }
  .lang-switch { margin-left: auto; }
  .lang-switch ~ .burger { margin-left: 0; }
}
@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .section { padding: 72px 0; }
  .hero .container { grid-template-columns: 1fr; padding-top: 44px; gap: 40px; }
  .hero__visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .review-chip { left: 12px; }
  .about-strip { grid-template-columns: 1fr; margin-top: -32px; }
  .about-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid--4, .steps, .info-grid, .links { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .founder, .apply .container, .dash { grid-template-columns: 1fr; }
  .founder__img { max-width: 460px; }
  .steps--5 { grid-template-columns: 1fr; }
  .weather { grid-template-columns: repeat(3, 1fr); }
  .news { grid-template-columns: repeat(2, 1fr); }
  .hsk { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .dash { margin-top: -40px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding: 56px 0; }
  .logo__text small { display: none; }
  .hero__lead { font-size: 1.05rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .review-chip { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .grid--2, .grid--3, .grid--4, .steps, .info-grid, .links, .checklist, .row-2, .fx__rates { grid-template-columns: 1fr; }
  .clock { padding: 16px; }
  .reviews { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .weather { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wcard { padding: 14px; }
  .forecast__days { grid-template-columns: repeat(4, 1fr); }
  .forecast__days .fday:nth-child(n+5) { display: none; }
  .news { grid-template-columns: 1fr; }
  .hsk { grid-template-columns: repeat(2, 1fr); }
  .hsk--3 { grid-template-columns: repeat(3, 1fr); }
  .process-cta .btn { width: 100%; }
  .form { padding: 24px 20px; }
  .panel { padding: 22px 18px; }
  .converter { grid-template-columns: 1fr; }
  .converter__eq { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-band { padding: 26px 22px; }
  .fab-wa { display: none; }
  .mobile-cta { display: grid; grid-template-columns: 1fr auto; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s; }
  .mobile-cta.is-visible { transform: none; }
  .mobile-cta .btn { padding: 14px 18px; }
  .footer { padding-bottom: 96px; }
}
.nav__mobile-extra { display: none; }

/* Иконки соцсетей в подвале */
.footer__social { display: flex; flex-wrap: wrap; gap: 8px; }
.social { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; color: #fff; font-weight: 700; font-size: .88rem; transition: transform .15s, filter .15s; }
.social svg { width: 18px; height: 18px; flex: none; }
.social:hover { color: #fff !important; transform: translateY(-1px); filter: brightness(1.08); }
.social--wa { background: #25d366; }
.social--ig { background: linear-gradient(45deg, #f9a825, #e1306c 45%, #833ab4); }

/* ---------- Кабинет ученика и админка */
.header__login { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.header__login:hover, .header__login[aria-current='page'] { background: var(--cream); color: var(--ink); }
.header__login svg, .nav .btn svg { width: 16px; height: 16px; }
.cabinet { min-height: calc(100vh - var(--header-h) - 200px); padding: 56px 0 80px; }
.auth-card { max-width: 420px; margin: 24px auto; background: #fff; border-radius: 24px; padding: 36px 32px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-card form { text-align: left; margin-top: 24px; }
.auth-card__icon { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.auth-card__icon svg { width: 28px; height: 28px; }
.auth-card__sub { color: var(--muted); margin: 0; }
.auth-card__help { font-size: .86rem; color: var(--muted); margin: 20px 0 0; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px !important; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 1.1rem; padding: 8px; opacity: .6; }
.pass-toggle:hover { opacity: 1; }
.field input[type='password'], .field input[type='url'] { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.field input[type='password']:focus, .field input[type='url']:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(242, 191, 75, .25); }
.form__error { color: var(--red); font-weight: 600; font-size: .88rem; margin: 0 0 12px; }
.form__ok { color: var(--green); font-weight: 700; font-size: .88rem; margin: 0 0 12px; }

.cab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.cab-head__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 4px 0; }
.cab-head__group { display: inline-block; margin: 6px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-weight: 800; font-size: .85rem; }
.cab-head__actions { display: flex; gap: 8px; }
.pass-form { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); margin-bottom: 28px; max-width: 640px; }
.mat-section { margin-bottom: 36px; }
.mat-section h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mat-section h2 small { font-family: var(--font); font-size: .78rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.mat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-align: left; text-decoration: none; color: var(--text); font: inherit; width: 100%; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: transparent; }
.mat__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.mat__ico svg { width: 22px; height: 22px; }
.mat__ico--video { background: var(--red-soft); color: var(--red); }
.mat__ico--file { background: var(--navy-soft); color: var(--navy); }
.mat__ico--link { background: #fff1dc; color: #9a5a00; }
.mat__body { flex: 1; min-width: 0; }
.mat__body b { display: block; color: var(--ink); }
.mat__body span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.4; }
.mat__go { font-weight: 800; font-size: .82rem; color: var(--red); white-space: nowrap; }
.modal__box--wide { width: min(960px, 100%); aspect-ratio: 16 / 9; }

.admin-bar { background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.admin-bar__links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-bar__links a { font-weight: 700; font-size: .88rem; }
.admin { min-height: calc(100vh - 68px); padding: 32px 0 80px; }
.admin-block { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; margin-bottom: 24px; }
.admin-block__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-block__head h2 { font-size: 1.5rem; margin: 0; }
.admin-block__head h2 small { font-family: var(--font); font-size: .9rem; color: var(--muted); }
.admin-search { width: min(320px, 100%); padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.admin-hint { color: var(--muted); font-size: .9rem; margin-top: -6px; }
.admin-form { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1.2fr auto; gap: 12px; align-items: end; padding: 18px; border-radius: 16px; background: var(--cream); margin-bottom: 18px; }
.admin-form--material { grid-template-columns: 1.4fr 1.4fr 1fr 1fr; }
.admin-form--material .field--wide { grid-column: span 3; }
.admin-form .field { margin: 0; }
.admin-form .field input { padding: 11px 13px; }
.admin-form .form__error { grid-column: 1 / -1; margin: 0; }
.credentials { padding: 18px; border-radius: 16px; background: #e7f6ed; border: 1px solid #b7e3c8; margin-bottom: 18px; }
.credentials pre { white-space: pre-wrap; background: #fff; border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin: 10px 0 12px; user-select: all; }
.admin-table td small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.admin-table code { background: var(--cream); padding: 2px 8px; border-radius: 6px; font-size: .88rem; }
.admin-table tr.is-off td { opacity: .55; }
.admin-table .empty { text-align: center; color: var(--muted); padding: 28px; }
.admin-table .muted { color: var(--muted); }
.admin-table .actions { white-space: nowrap; text-align: right; }
.admin-table .actions button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: .8rem; margin-left: 6px; }
.admin-table .actions button:hover { border-color: var(--ink); }
.admin-table .actions .danger { color: var(--red); }
.admin-table .actions .danger:hover { border-color: var(--red); }
.cell-input { width: 160px; padding: 6px 8px; border: 1.5px solid transparent; border-radius: 8px; font: inherit; font-size: .9rem; background: transparent; }
.cell-input:hover, .cell-input:focus { border-color: var(--line); background: #fff; outline: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .85rem; font-weight: 700; }
.switch input { width: 18px; height: 18px; accent-color: var(--green); }
@media (max-width: 980px) {
  .admin-form, .admin-form--material { grid-template-columns: 1fr 1fr; }
  .admin-form--material .field--wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .mat-list { grid-template-columns: 1fr; }
  .mat__go { display: none; }
  .admin-form, .admin-form--material { grid-template-columns: 1fr; }
  .admin-block { padding: 18px 14px; }
  .auth-card { padding: 28px 20px; }
}

/* ---------- Курсы китайского */
.cta-band--navy { background: linear-gradient(120deg, var(--navy), #111a3d); color: #fff; }
.cta-band--navy h3 { color: #fff; }
.cta-band--navy p { color: rgba(255, 255, 255, .8); }
.branch { display: flex; flex-direction: column; }
.branch h3 { font-size: 1.5rem; margin-bottom: 12px; }
.branch__addr { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.branch__addr svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 2px; }
.branch__addr b { display: block; color: var(--ink); font-size: 1.05rem; }
.branch__addr span { color: var(--muted); font-size: .92rem; }
.branch__map { font-weight: 700; font-size: .9rem; margin-bottom: 20px; }
.branch .btn { margin-top: auto; }
.branch-note { text-align: center; color: var(--muted); margin: 24px 0 0; }

/* Шапка на ноутбуках: 4 пункта меню + кабинет + кнопка */
.header .container { max-width: 1480px; }
@media (max-width: 1680px) {
  .header__phone { display: none; }
}
@media (max-width: 1360px) {
  .header .container { gap: 18px; }
  .header__login span { display: none; }
  .header__login { padding: 8px; }
  .header__login svg { width: 20px; height: 20px; }
}
@media (max-width: 1120px) {
  .header__login { display: none; }
}

/* ---------- Памятка студента */
.cab-tabs { display: inline-flex; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 24px; }
.cab-tabs button { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font-weight: 800; color: var(--text); }
.cab-tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
.cab-tabs small { opacity: .7; }
#guide, #handbook:not([hidden]) { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.guide-nav { display: grid; gap: 6px; position: sticky; top: calc(var(--header-h) + 16px); }
.guide-nav button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; padding: 11px 14px; border-radius: 12px; font-weight: 700; color: var(--text); line-height: 1.3; }
.guide-nav button:hover { background: #fff; }
.guide-nav button[aria-current='true'] { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.guide-nav small { margin-left: auto; font-size: .74rem; background: var(--cream); border-radius: 999px; padding: 2px 8px; color: var(--muted); white-space: nowrap; }
.guide-nav small.is-done { background: #e7f6ed; color: var(--green); }
.guide-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 30px 32px; }
.guide-card h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; margin-bottom: 14px; }
.guide-card h4 { font-size: 1.05rem; margin: 22px 0 10px; color: var(--ink); }
.guide-card p { margin: 0 0 12px; }
.g-list { margin: 0 0 12px; padding-left: 20px; }
.g-list li { margin-bottom: 6px; }
.g-checks { display: grid; gap: 8px; margin-bottom: 12px; }
.g-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.g-check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 1px; flex: none; }
.g-check:has(input:checked) { border-color: var(--green); background: #f3fbf6; }
.g-check:has(input:checked) span { text-decoration: line-through; text-decoration-color: rgba(31, 157, 85, .6); color: var(--muted); }
.g-note { padding: 14px 16px; border-radius: 12px; background: #fff6dc; border-left: 4px solid var(--gold); color: var(--maroon-900); font-weight: 600; margin-top: 16px !important; }
.guide-next { margin-top: 18px; }

.guide-admin { display: grid; gap: 6px; margin-bottom: 14px; }
.guide-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.guide-row__title { display: flex; gap: 10px; font-weight: 700; color: var(--ink); }
.guide-row .actions button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: .8rem; margin-left: 6px; }
.guide-row .actions button:hover:not(:disabled) { border-color: var(--ink); }
.guide-row .actions button:disabled { opacity: .35; }
.guide-row .actions .danger { color: var(--red); }
.guide-editor { padding: 18px; border-radius: 16px; background: var(--cream); margin: 4px 0 16px; }
.guide-editor__top { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.guide-editor__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-editor textarea { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; line-height: 1.5; min-height: 380px; }
.guide-editor .field input { padding: 11px 13px; }
.guide-preview { max-height: 470px; overflow: auto; padding: 20px; }
.guide-help code { background: #fff; padding: 1px 6px; border-radius: 5px; font-size: .8rem; }
.guide-editor__actions { display: flex; gap: 10px; }
@media (max-width: 980px) {
  #guide, #handbook:not([hidden]) { grid-template-columns: 1fr; }
  .guide-nav { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .guide-nav button { flex: none; background: #fff; border-color: var(--line); }
  .guide-editor__cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cab-tabs { display: flex; }
  .cab-tabs button { flex: 1; padding: 10px 8px; font-size: .9rem; }
  .guide-card { padding: 22px 18px; }
  .guide-card h2 { font-size: 1.3rem; }
  .guide-row { flex-direction: column; align-items: flex-start; }
}

/* ===================================================== CRM */
.crm { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.crm-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.crm-nav a { padding: 11px 14px; border-radius: 12px; font-weight: 700; color: var(--text); text-decoration: none; }
.crm-nav a:hover { background: var(--cream); }
.crm-nav a[aria-current='true'] { background: var(--ink); color: #fff; }
.crm-main { min-width: 0; }
.crm-me { font-weight: 700; font-size: .9rem; color: var(--muted); }
.crm-section-hint { margin: 0 0 14px; }
.crm-staff-form { grid-template-columns: 1.2fr 1fr 1fr; }
.crm-checks { border: 0; padding: 0; margin: 0; grid-column: span 3; }
.crm-checks > div { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-check { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: .88rem; cursor: pointer; }
.crm-check input { accent-color: var(--red); }
.crm-form-actions { display: flex; gap: 8px; grid-column: 1 / -1; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--cream); font-size: .8rem; font-weight: 700; margin: 2px 2px 2px 0; }
.crm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.crm-tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.crm-tabs button[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* «Ученики»: дни недели (как вкладки, но помельче) и сортировка по времени в заголовке */
.st-days { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 14px; }
.st-days button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 700; color: var(--text); cursor: pointer; }
.st-days button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.th-sort span { display: inline-block; min-width: 1em; color: var(--red); font-weight: 800; }
.th-sort:hover { text-decoration: underline; }
/* «Группы»: преподаватель и день недели; занятие выбранного дня в расписании — выделено */
.grp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -4px 0 14px; }
.grp-filters select { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-weight: 600; max-width: 100%; }
.grp-filters .st-days { margin: 0; }
.grp-slot--day { font-weight: 800; color: var(--ink); background: #fff3d3; border-radius: 6px; padding: 0 4px; }
.crm-tabs small { opacity: .7; }
.crm-dict-add { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; border-radius: 16px; background: var(--cream); margin-bottom: 16px; }
.crm-dict-add .field { margin: 0; min-width: 140px; }
.crm-dict-add .field input, .crm-dict-add .field select { padding: 10px 12px; }
.crm-dict-add .form__error { flex-basis: 100%; margin: 0; }
.cell-input--num { width: 80px; }
.auth-card--wide { max-width: 480px; }
.crm-steps { text-align: left; padding-left: 20px; margin: 18px 0; line-height: 1.6; }
.crm-qr { display: grid; place-items: center; margin: 18px 0 8px; }
.crm-qr svg { width: 220px; height: 220px; }
.crm-codes { text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; line-height: 1.8; background: var(--cream); border-radius: 12px; padding: 14px; margin: 16px 0; user-select: all; }
#view-2fa-setup .btn + .btn, #view-2fa-setup form .btn { margin-top: 10px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--red); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.crm-inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 12px; }
.crm-inline-form .field { margin: 0; }
.crm-inline-form .form__error { flex-basis: 100%; }
@media (max-width: 900px) {
  .crm { grid-template-columns: 1fr; }
  .crm-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; flex-direction: row; justify-content: space-around; border-radius: 16px 16px 0 0; padding: 6px; box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); }
  .crm-nav a { padding: 10px 8px; font-size: .78rem; text-align: center; }
  .crm-main { padding-bottom: 80px; }
  .crm-staff-form { grid-template-columns: 1fr; }
  .crm-checks { grid-column: auto; }
}

/* ===================================================== CRM: продажи */
.crm-nav { overflow-x: auto; }
.no-scroll { overflow: hidden; }
.danger-text { color: var(--red) !important; }
.chip--ok { background: #e7f6ed; color: #1d7a45; }
.chip--bad { background: var(--red-soft); color: var(--red); }
.chip--muted { background: #eee; color: var(--muted); }
.stage-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--cream); }
.stage-NEW { background: #fff3d6; }
.stage-CONTACTED { background: #e8f0ff; }
.stage-TRIAL_BOOKED, .stage-TRIAL_DONE { background: #efe8ff; }
.stage-SALES, .stage-CONTRACT { background: #e0f4f4; }
.stage-WON { background: #e7f6ed; color: #1d7a45; }
.stage-LOST { background: #f1f1f1; color: var(--muted); }
.deals-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.deals-toolbar .crm-tabs { margin: 0; }
.deals-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.deals-filters select, .deals-filters .admin-search { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kanban__col { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 160px; }
.kanban__col.is-over { outline: 2px dashed var(--gold-dark); }
.kanban__col h3 { font-size: .95rem; margin: 2px 4px 10px; font-family: var(--font); }
.kanban__col h3 small { color: var(--muted); }
.deal-card { background: var(--cream); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; border: 1.5px solid transparent; }
.deal-card:hover { border-color: var(--line); }
.deal-card small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.deal-card.is-overdue, tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.deal-card__next { color: var(--ink) !important; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }
.deals-table tbody tr { cursor: pointer; }
.crm-drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.crm-drawer__backdrop { position: absolute; inset: 0; background: rgba(20, 16, 14, .35); opacity: 0; transition: opacity .2s; }
.crm-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: #fff; overflow-y: auto; transform: translateX(100%); transition: transform .25s; padding: 22px 22px 60px; box-shadow: -10px 0 30px rgba(0, 0, 0, .12); }
.crm-drawer__panel.is-wide { width: min(760px, 100%); }
.crm-drawer.is-open { pointer-events: auto; }
.crm-drawer.is-open .crm-drawer__backdrop { opacity: 1; }
.crm-drawer.is-open .crm-drawer__panel { transform: none; }
.crm-drawer__close { position: sticky; top: 0; float: right; border: 0; background: var(--cream); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 2; }
.crm-drawer h2 { font-size: 1.4rem; margin: 0 0 14px; }
.deal-head h2 small { font-family: var(--font); font-size: 1rem; color: var(--muted); }
.deal-head__meta { color: var(--muted); font-size: .88rem; margin: 4px 0 12px; }
.deal-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-pair { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.phone-pair > small { font-size: .78rem; font-weight: 700; color: var(--muted, #6b6b6b); }
.parent-phone { margin: 0 0 12px; }
.deal-switch { margin: 10px 0 0; }
.enr-past { margin-top: 10px; }
.pay-terminal { margin: -2px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7e0; font-size: .9rem; }
.pay-terminal small { color: var(--muted); }
.enr-past > summary { cursor: pointer; color: var(--muted); font-size: .88rem; font-weight: 700; }
.deal-trial.is-past { opacity: .75; }
.deal-lost { margin-top: 10px; color: var(--muted); }
.deal-box { border-top: 1px solid var(--line); padding: 14px 0; }
.deal-box.is-overdue h3 { color: var(--red); }
.deal-box h3 { font-size: 1rem; font-family: var(--font); margin: 0 0 10px; }
.deal-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.deal-inline input[type="text"] { flex: 1 1 220px; }
.deal-inline input, .deal-inline select, .deal-grid input, .deal-grid select { padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; min-width: 0; }
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; align-items: end; margin-bottom: 10px; }
.deal-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 700; }
.deal-grid label.crm-check { flex-direction: row; justify-self: start; }
.deal-grid .span-2, .deal-grid .form__error { grid-column: 1 / -1; }
.deal-grid .btn { justify-self: start; }
.deal-tasks { list-style: none; padding: 0; margin: 0; }
.deal-tasks li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; }
.deal-tasks li.is-overdue b { color: var(--red); }
.deal-trial, .deal-contract { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.deal-trial small, .deal-contract small { display: block; color: var(--muted); }
.deal-trial .actions, .deal-contract .actions, .parent-actions, .settle-sum .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.deal-trial .actions button, .deal-contract .actions button, .week-trial .actions button, .parent-actions button, .settle-sum .actions button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.deal-trial .actions .danger, .deal-contract .actions .danger { color: var(--red); }
.deal-events { list-style: none; padding: 0; margin: 12px 0 0; font-size: .88rem; }
.deal-events li { padding: 6px 0; border-bottom: 1px solid #f3efe9; }
.deal-events time { color: var(--muted); font-size: .8rem; margin-right: 6px; }
.ev-NOTE span { background: #fffbe8; }
.booker { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--cream); }
.booker__row { margin-top: 10px; }
.booker__slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.booker__slots button { border: 1.5px solid #2e9d5b; background: #fff; color: var(--ink); border-radius: 8px; padding: 6px 9px; font-weight: 700; font-size: .82rem; cursor: pointer; }
.booker__slots button:disabled { border-color: transparent; background: #ece7df; color: #b7aea2; cursor: not-allowed; text-decoration: line-through; }
.today-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.today-block { padding: 18px 20px; }
.today-list { list-style: none; padding: 0; margin: 0; }
.today-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.today-card:last-child { border-bottom: 0; }
.today-card__main small { display: block; color: var(--muted); font-size: .82rem; }
.today-card__type { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.today-card.is-overdue .today-card__type { color: var(--red); }
.role-chip { display: inline-block; padding: 0 .4em; border-radius: 4px; background: var(--line, #eee); color: var(--ink, #333); font-weight: 600; }
.today-card__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.week { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 10px; overflow-x: auto; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 120px; }
.week-day.is-today { border-color: var(--gold-dark); }
.week-day h3 { font-size: .9rem; font-family: var(--font); margin: 0 0 8px; text-transform: capitalize; }
.week-trial { background: var(--cream); border-radius: 10px; padding: 8px; margin-bottom: 6px; font-size: .88rem; }
.week-trial.is-ok { background: #e7f6ed; }
.week-trial.is-bad { background: #f6e8e8; }
.week-trial small { display: block; color: var(--muted); }
.week-trial .actions { display: flex; gap: 4px; margin-top: 4px; }
.slot-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.slot-row select, .slot-row input { padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
@media (max-width: 900px) {
  .crm-nav { justify-content: flex-start; }
  .crm-nav a { flex: 0 0 auto; }
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .today-card { flex-direction: column; align-items: stretch; }
  .week { grid-template-columns: repeat(7, 160px); }
}

/* ===================================================== CRM: обучение и деньги */
.mark-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mark-btns { display: flex; gap: 6px; }
.mark-btns input { position: absolute; opacity: 0; pointer-events: none; }
.mark-btns span { display: inline-block; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700; font-size: .88rem; cursor: pointer; min-width: 64px; text-align: center; }
.mark-btns input:checked + .mark-P { background: #2e9d5b; border-color: #2e9d5b; color: #fff; }
.mark-btns input:checked + .mark-N { background: var(--red); border-color: var(--red); color: #fff; }
.mark-btns input:checked + .mark-U { background: #e8a33d; border-color: #e8a33d; color: #fff; }
.mark-btns input:checked + .mark-O { background: #4a6fd1; border-color: #4a6fd1; color: #fff; }
.mark-btns input:focus-visible + span { outline: 2px solid var(--ink); }



td.mark-P { background: #e7f6ed; } td.mark-N { background: #f9e3e3; } td.mark-U { background: #fff3d6; } td.mark-O { background: #e8f0ff; }
.money-totals { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.money-totals div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; min-width: 130px; }
.money-totals small { display: block; color: var(--muted); font-size: .78rem; }
.money-totals b { font-size: 1.2rem; }
.money-totals .is-writeoff { background: #f4f4f4; border-style: dashed; }
.money-totals .is-writeoff b { color: var(--muted); }
tr[data-writeoff] td { color: var(--muted); }
/* Расторжение договора при уходе (2026-11-22) */
.chip--refund { background: var(--red-soft, #fde8e8); color: var(--red, #b3261e); }
.leave-mode, .settle-dir { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.leave-mode legend, .settle-dir legend { font-size: .82rem; font-weight: 700; padding: 0 4px; }
.settle-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.settle-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.settle-table td:last-child { text-align: right; white-space: nowrap; font-weight: 700; padding-left: 12px; }
.settle-table small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.settle-total td { border-bottom: 0; font-size: 1.02rem; }
.settle-lessons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.settle-lessons span { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--cream); }
.settle-lessons span.is-free { background: #eee; color: var(--muted); text-decoration: line-through; }
.settle-final { margin-top: 10px; }
.settle-sum { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.settle-sum p { margin: 0 0 6px; }
.money-table { font-size: .9rem; }
.today-card.is-off { opacity: .55; }
@media (max-width: 600px) { .mark-btns span { min-width: 0; padding: 10px 9px; } }

/* Нет телефона — нет кнопок звонка и WhatsApp */
a[href="#no-phone"] { display: none !important; }

/* Иконки меню CRM: контурные, цвет текста */
.crm-nav a { display: flex; align-items: center; gap: 10px; }
.nav-ico { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.crm-nav a[aria-current='true'] .nav-ico { opacity: 1; }
@media (max-width: 900px) {
  .crm-nav a { flex-direction: column; gap: 3px; }
  .nav-ico { width: 20px; height: 20px; }
}

/* Журнал группы: таблица посещаемости за месяц */
.jt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; font-size: .85rem; color: var(--muted); }
.jt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jt-legend i { font-style: normal; }
.journal-table { border-collapse: separate; border-spacing: 0; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .88rem; }
.journal-table th, .journal-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.journal-table thead th { background: var(--cream); font-weight: 700; color: var(--ink); vertical-align: bottom; }
.journal-table tbody tr:last-child > * { border-bottom: 0; }
.journal-table tbody tr:hover > * { background: #fdfaf6; }
.journal-table .jt-name { text-align: left; white-space: nowrap; font-weight: 700; padding-left: 14px; position: sticky; left: 0; background: #fff; z-index: 1; }
.journal-table thead .jt-name { background: var(--cream); }
.jt-day { min-width: 34px; line-height: 1.15; }
.jt-day small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.journal-table .is-today { background: #fff4f4 !important; }
.journal-table thead .is-today { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.journal-table .is-future { opacity: .45; }
.journal-table .is-off { opacity: .35; text-decoration: line-through; }
.jt-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 800; font-size: .78rem; line-height: 1; }
.jt-P { background: #e3f4ea; color: #1f7a45; }
.jt-N { background: #fbe4e6; color: #b3202d; }
.jt-U { background: #fff1d2; color: #9a6410; }
.jt-O { background: #e6edfc; color: #3556b0; }
.jt-none { color: #c9bdb6; font-weight: 800; }
.journal-table .jt-sum { min-width: 46px; color: var(--muted); font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); }
.journal-table thead .jt-sum, .journal-table thead .jt-pct { font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.journal-table .jt-sum--P { color: #1f7a45; font-weight: 700; }
.journal-table .jt-sum--N { color: #b3202d; font-weight: 700; }
.journal-table .jt-pct { min-width: 56px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
/* Общий журнал за месяц (все ученики) */
.journal-table--all .jt-group { text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .8rem; }
.journal-table--all .jt-day { min-width: 30px; }
.journal-table .is-weekend { background: #f3ece4; }
.journal-table tr.is-left .jt-name { color: var(--muted); font-weight: 600; }
.journal-table .jt-name small { font-weight: 600; color: var(--muted); font-size: .72rem; }
[data-j-search] { min-width: 200px; }
.journal-table th.jt-name, .journal-table td.jt-group { text-transform: none; letter-spacing: 0; }
.journal-table tbody th.jt-name { font-size: .9rem; color: var(--ink); font-weight: 700; background: #fff; }
.journal-table tbody tr.is-left th.jt-name { color: var(--muted); font-weight: 600; }
.journal-table .jt-sum:not(.jt-sum--P):not(.jt-sum--N), .journal-table td.jt-sum:empty { color: var(--muted); }

/* Посещаемость: компактная таблица во всю ширину */
body.crm-wide #main > .container { max-width: none; }
.journal-table--all { width: auto; min-width: 100%; }
.journal-table--all th.jt-name { min-width: 170px; max-width: 230px; padding: 6px 10px 6px 12px; vertical-align: middle; box-shadow: 1px 0 0 var(--line); }
.jt-who { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-who small { font-weight: 600; color: var(--muted); font-size: .7rem; }
.jt-grp { display: block; margin-top: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-table .jt-total { min-width: 62px; padding: 4px 6px; line-height: 1.1; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.journal-table thead .jt-total { font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.jt-total b { display: block; font-size: .9rem; }
.jt-total small { display: block; font-size: .66rem; color: var(--muted); white-space: nowrap; }
.jt-c-P { color: #1f7a45; font-weight: 700; } .jt-c-N { color: #b3202d; font-weight: 700; }
.jt-pct-none { color: var(--muted); }
.journal-table--all .jt-day, .journal-table--all .jt-cell { min-width: 26px; width: 26px; padding: 5px 1px; }
.journal-table--all .jt-mark { width: 20px; height: 20px; border-radius: 6px; font-size: .72rem; }
.journal-table--all .jt-day small { font-size: .6rem; }
.journal-table--all th.jt-name { width: 230px; }
.journal-table--all .jt-day, .journal-table--all .jt-cell { width: auto; }

/* Посещаемость: панель фильтров */
.jf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.jf-head h2 { font-size: 1.5rem; margin: 0 0 6px; }
.jf-tabs { margin: 0; align-self: flex-end; }
.jf-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.jf-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.jf-field[hidden] { display: none; }
.jf-label { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.jf-select, .jf-search, .jf-month { display: flex; align-items: center; height: 42px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.jf-select:focus-within, .jf-search:focus-within, .jf-month:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(30, 20, 22, .08); }
.jf-select svg, .jf-search svg, .jf-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 18px; }
.jf-select svg, .jf-search svg { margin-left: 12px; color: var(--muted); }
.jf-select { position: relative; min-width: 240px; }
.jf-select select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); height: 100%; padding: 0 36px 0 10px; width: 100%; cursor: pointer; outline: none; }
.jf-select::after { content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.jf-month { padding: 0 4px; gap: 2px; }
.jf-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; }
.jf-arrow:hover:not(:disabled) { background: var(--cream); }
.jf-arrow:disabled { opacity: .3; cursor: default; }
.jf-month__label { min-width: 132px; text-align: center; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.jf-today { margin: 0 4px 0 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.jf-today[hidden] { display: none; }
.jf-search { min-width: 220px; }
.jf-search input { border: 0; outline: none; background: transparent; font: inherit; height: 100%; padding: 0 12px 0 8px; width: 100%; color: var(--ink); }
@media (max-width: 700px) {
  .jf-bar, .jf-field, .jf-select, .jf-search { width: 100%; }
  .jf-month { justify-content: space-between; }
}

/* Карточка ученика: посещаемость; список: логин в кабинет */
.st-att-total { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.st-att-total > div { background: var(--cream); border-radius: 12px; padding: 10px 12px; }
.st-att-total small { display: block; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.st-att-total b { font-size: 1.15rem; }
.st-att-month { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.st-att-month summary { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.st-att-month summary::-webkit-details-marker { display: none; }
.st-att-month summary::after { content: '›'; color: var(--muted); transition: transform .15s; }
.st-att-month[open] summary::after { transform: rotate(90deg); }
.st-att-month__sum { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--muted); }
.st-att-marks { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.st-att-mark { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 38px; }
.st-att-mark small { font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-cab code { font-size: .8rem; background: var(--cream); padding: 3px 7px; border-radius: 6px; }
.st-cab code.is-off { opacity: .45; text-decoration: line-through; }
.credentials__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
tbody[data-students] tr[data-id] { cursor: pointer; }
@media (max-width: 600px) { .st-att-total { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Кабинет учеников: таблица логинов в три столбца — всё помещается без сокращений */
.cab-table { table-layout: fixed; width: 100%; }
.cab-table th:nth-child(1) { width: 34%; } .cab-table th:nth-child(2) { width: 38%; } .cab-table th:nth-child(3) { width: 28%; }
.cab-table td { vertical-align: top; white-space: normal; }
.cab-who b { display: block; overflow-wrap: anywhere; }
.cab-login { display: block; margin-top: 4px; }
.cab-login code { font-size: .8rem; background: var(--cream); padding: 2px 7px; border-radius: 6px; overflow-wrap: anywhere; }
.cab-who small, .cab-group small { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.cell-input--wide { width: 100%; }
.cab-access .switch { margin-bottom: 8px; }
.cab-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 700px) {
  .cab-table, .cab-table tbody, .cab-table tr, .cab-table td { display: block; width: 100% !important; }
  .cab-table thead { display: none; }
  .cab-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cab-table td { border: 0; padding: 4px 8px; }
}
.cab-group-input { display: block; resize: none; field-sizing: content; min-height: 34px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; font-weight: 600; }

/* Пагинация списков */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.pager__info b { color: var(--ink); }
.pager__pages { display: flex; align-items: center; gap: 4px; }
.pager__btn { min-width: 36px; height: 36px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.pager__btn:hover:not(:disabled):not(.is-current) { border-color: var(--ink); }
.pager__btn.is-current { background: var(--ink); border-color: var(--ink); color: #fff; cursor: default; }
.pager__btn:disabled { opacity: .35; cursor: default; }
.pager__gap { padding: 0 4px; }
.pager__size { display: flex; align-items: center; gap: 6px; }
.pager__size select { height: 36px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; }
@media (max-width: 600px) { .pager { justify-content: center; } }

/* ===================================================== CRM: UX — каркас, навигация, обратная связь */

/* Рабочая область шире: канбан, календарь и таблицы не обрезаются на больших экранах */
.admin--crm > .container { max-width: 1640px; padding: 0 24px; }
.admin--crm { padding-top: 24px; }

/* Шапка: имя и роль сотрудника */
.crm-me { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.crm-me b { color: var(--ink); font-size: .92rem; }
.crm-me small { font-size: .74rem; color: var(--muted); font-weight: 600; }

/* Полоса загрузки вверху, пока идут запросы */
html.is-busy::before { content: ''; position: fixed; z-index: 300; top: 0; left: 0; height: 3px; width: 40%; background: var(--red);
  animation: crm-busy 1s ease-in-out infinite; }
@keyframes crm-busy { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.crm-loading { padding: 40px 0; text-align: center; color: var(--muted); font-weight: 600; }
.crm-loading::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -3px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: crm-spin .8s linear infinite; }
@keyframes crm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html.is-busy::before, .crm-loading::before { animation: none; } }

/* Заголовок раздела */
.crm-head { margin: 2px 0 18px; }
.crm-head h1 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 0 0 4px; }
.crm-head p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 760px; }

/* Меню: группы, подписи, счётчики */
.crm-nav { gap: 2px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-group__title { padding: 2px 14px 4px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crm-nav a { position: relative; }
.crm-nav .nav-text { flex: 1; min-width: 0; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; line-height: 1; }
.nav-badge[hidden] { display: none; }
.crm-nav a[aria-current='true'] .nav-badge { background: #fff; color: var(--ink); }
.nav-mobile { display: none; }
.nav-more { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }

/* Единый вид полей в CRM (низкая специфичность — частные стили важнее) */
:where(.crm-main, .crm-drawer, .crm-dialog) :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  font: inherit; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 40px; padding: 8px 12px; }
:where(.crm-main, .crm-drawer, .crm-dialog) :where(input, select, textarea):focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(30, 20, 22, .08); }
:where(.crm-main) :where(button, a.btn):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Таблицы: расписание и даты не ломаются посреди строки */
.crm-main td { vertical-align: top; }
[data-section="schedule"] td:nth-child(4) { white-space: nowrap; }

/* Уведомления */
.crm-toasts { position: fixed; z-index: 400; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.crm-toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-size: .92rem; font-weight: 600; animation: crm-toast-in .2s ease-out; }
.crm-toast span { flex: 1; }
.crm-toast button { border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: .7; padding: 0 2px; }
.crm-toast--error { background: #a51b27; }
.crm-toast--ok { background: #1f7a45; }
.crm-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes crm-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Окно подтверждения */
.crm-dialog { border: 0; border-radius: 18px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.crm-dialog::backdrop { background: rgba(30, 20, 22, .45); }
.crm-dialog--form { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.crm-dialog--form .deal-grid { margin: 0; }
.crm-dialog--form h3 { margin: 0 0 4px; }
.crm-dialog h3 { margin: 0 0 8px; font-size: 1.15rem; }
.crm-dialog p { margin: 0 0 16px; color: var(--text); line-height: 1.45; }
.crm-dialog__input { width: 100%; margin-bottom: 16px; }
.crm-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn--danger { background: var(--red); color: #fff; border-color: var(--red); }

/* Телефон: снизу 4 главных раздела и «Ещё»; «Ещё» открывает все разделы по группам */
@media (max-width: 900px) {
  .admin--crm > .container { padding: 0 14px; }
  .crm-nav { flex-direction: column; overflow: visible; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .crm-nav .nav-group { display: none; }
  .nav-mobile { display: flex; justify-content: space-around; gap: 2px; }
  .nav-mobile a, .nav-more { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; font-size: .72rem; text-align: center; }
  .nav-mobile .nav-text { flex: none; }
  .nav-mobile .nav-badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; font-size: .66rem; }
  .nav-more[aria-expanded='true'] { background: var(--ink); color: #fff; }
  .nav-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  body.nav-open .crm-nav { max-height: 78vh; overflow-y: auto; border-radius: 20px 20px 0 0; }
  body.nav-open .crm-nav .nav-group { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; order: -1; margin: 0 0 8px; padding: 8px 4px 0; border-top: 0; }
  body.nav-open .crm-nav .nav-group__title { grid-column: 1 / -1; }
  body.nav-open .crm-nav .nav-group a { flex-direction: row; justify-content: flex-start; font-size: .88rem; padding: 10px 12px; text-align: left; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; z-index: 40; background: rgba(30, 20, 22, .35); }
  .crm-me small { display: none; }
  .crm-toasts { right: 12px; left: 12px; bottom: 84px; max-width: none; }
}
/* Шапка CRM — той же ширины, что и рабочая область */
.admin-bar:has(+ .admin--crm) .container { max-width: 1640px; padding: 0 24px; }
/* «Сегодня» на широком экране — две колонки: задачи и заявки слева, пробные справа */
@media (min-width: 1280px) {
  [data-today] { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
  [data-today] > .today-block { margin-bottom: 20px; }
}
.grp-fill { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.grp-fill small { display: block; font-weight: 600; }
.grp-fill.is-full { color: var(--red); }

/* Уроки: выбор дня, просроченные неотмеченные, история правок отметок */
.jf-date { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 0 4px; min-width: 9.5em; cursor: pointer; }
.jf-date:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.jf-mine { align-self: flex-end; padding-bottom: 8px; }
.today-card.is-late { border-left: 3px solid var(--red); }
.mark-btns input:disabled + span { cursor: default; opacity: .7; }
.mark-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef0f3; color: var(--muted, #667); }
.mark-chip.mark-P { background: #e7f6ed; color: #1f7a45; } .mark-chip.mark-N { background: #f9e3e3; color: #b3261e; }
.mark-chip.mark-U { background: #fff3d6; color: #8a5a00; } .mark-chip.mark-O { background: #e8f0ff; color: #2f4fa8; }
.mark-history { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.mark-history summary { cursor: pointer; font-weight: 700; }
.mark-history ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.mark-history li { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; font-size: .88rem; line-height: 1.5; }
.mark-history time { color: var(--muted, #667); font-variant-numeric: tabular-nums; }
.mark-history__edit { font-style: normal; font-size: .75rem; color: #b3261e; font-weight: 700; }
.lessons-empty { list-style: none; margin-top: 8px; }
.lessons-empty summary { cursor: pointer; color: var(--muted, #667); font-size: .9rem; padding: 10px 0; }
.lessons-empty .today-card { opacity: .7; }
/* «Мои занятия»: ближайший урок дня — зелёный */
.today-card.is-next { background: #f3fbf6; border-left: 4px solid var(--green); padding-left: 10px; border-radius: 8px; }
.next-chip { display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 999px; background: var(--green); color: #fff; font-size: .75rem; }
.lesson-join { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }

/* Кабинет ученика курсов: мои занятия */
.sched-day { margin: 0 0 18px; }
.sched-day h3 { font-size: 1rem; margin: 0 0 8px; }
.sched-day h3::first-letter { text-transform: uppercase; }
.sched-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sched-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sched-item b { display: block; }
.sched-item small { color: var(--muted, #667); }
.sched-item.is-next { border-color: var(--green); background: #f3fbf6; box-shadow: inset 4px 0 0 var(--green); }
.sched-item.is-off { opacity: .55; }
.sched-item.is-off b { text-decoration: line-through; }

/* CRM → «Программа»: уроки курса, файлы, упражнения */
.lib-num { width: 3em; font-weight: 800; color: var(--muted, #667); }
.lib-desc { white-space: pre-line; }
.lib-files { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.lib-files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lib-file__name { flex: 1 1 200px; }
.lib-files audio, .lib-ex audio, .ans-card audio, .ex-card audio, .topic-audio audio { width: min(100%, 360px); height: 40px; }
.lib-pages { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.lib-pages li { display: grid; gap: 4px; font-size: .85rem; }
.lib-pages img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #f6f6f8; }
.lib-tools { display: flex; gap: 4px; }
.lib-tools button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 28px; min-height: 28px; cursor: pointer; }
.lib-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.lib-upload input[type=file] { max-width: 100%; }
/* Видео урока (YouTube): превью → плеер на месте */
.lib-videos { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lib-videos li { display: grid; gap: 6px; font-size: .9rem; align-content: start; }
.lib-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; }
.lib-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lib-video__thumb { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #111; }
.lib-video__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, opacity .25s; opacity: .92; }
.lib-video__thumb:hover img, .lib-video__thumb:focus-visible img { transform: scale(1.03); opacity: 1; }
.lib-video__play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px 0 0 -28px; border-radius: 12px; background: #c8202f; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.lib-video__play::after { content: ''; position: absolute; left: 23px; top: 12px; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent #fff; }
.lib-video__title { font-weight: 600; line-height: 1.3; }
.lib-video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #111; }
.lib-video-file { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lib-progress { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; }
.lib-progress progress { flex: 1; height: 10px; accent-color: #c8202f; }
.lib-progress span { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.lib-video-add input[type=url] { flex: 1 1 280px; min-width: 0; }
.lib-video-add input[type=text] { flex: 1 1 200px; min-width: 0; }
.lib-video-add input[name=url] { flex: 1 1 280px; min-width: 0; }
/* Задания Wordwall: превью 4:3 → задание на месте */
.lib-ww { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lib-ww__frame { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); }
.lib-ww__frame .lib-video__thumb { background: #f6f6f8; }
.lib-ww__open { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: #1f2b5c; color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.lib-upload small { flex-basis: 100%; }
.lib-pdf { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; }
.lib-pdf input[type=number] { width: 5.5em; }
.lib-exercises { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.lib-ex { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.lib-ex__prompt { white-space: pre-line; }
.lib-ex__options { margin: 0; padding-left: 1.4em; }
.lib-ex__file { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lib-ex__file a { font-weight: 700; color: var(--red); word-break: break-word; }
/* «Открыть ученикам»: группы с переключателем */
.lib-access-bar { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: 2px 0 14px; }
.lib-access-dialog { border: 0; border-radius: 18px; padding: 20px 22px; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.lib-access-dialog::backdrop { background: rgba(30, 20, 22, .45); }
.lib-access-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lib-access-dialog__head h3 { margin: 0; font-size: 1.15rem; }
.lib-access-dialog__x { border: 0; background: none; font-size: 1.6rem; line-height: 1; padding: 2px 8px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.lib-access-dialog__x:hover { background: #f3eee9; color: var(--ink); }
.lib-access-dialog > .admin-hint { margin: 0 0 14px; }
.lib-access-dialog__actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.lib-access { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lib-access li { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.lib-access li small { flex: 1 1 200px; }
.lib-access__toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.lib-access__count { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.lib-access__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lib-access__switch { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d6cbc1; transition: background .2s; }
.lib-access__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.lib-access__toggle input:checked + .lib-access__switch { background: var(--green, #1f9d55); }
.lib-access__toggle input:checked + .lib-access__switch::after { transform: translateX(18px); }
.lib-access__toggle input:focus-visible + .lib-access__switch { outline: 3px solid rgba(31, 43, 92, .4); outline-offset: 2px; }
/* Доступ — по ученикам: группа (переключатель «вся группа», «наполовину» — открыт части) и её ученики */
.lib-access li.lib-access__group { display: block; padding: 10px 12px; }
.lib-access__head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.lib-access__head .lib-access__count { flex: 1 1 auto; }
.lib-access__toggle input:indeterminate + .lib-access__switch { background: #e8b84a; }
.lib-access__toggle input:indeterminate + .lib-access__switch::after { transform: translateX(9px); }
.lib-access__pupils { list-style: none; margin: 8px 0 0; padding: 8px 0 0 52px; border-top: 1px dashed var(--line); display: grid; gap: 4px; }
.lib-access .lib-access__pupils li { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding: 2px 0; border: 0; border-radius: 0; }
.lib-access__pupils small { flex: 1 1 140px; text-align: right; }
.lib-access__pupil { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.lib-access__pupil input { width: 18px; height: 18px; accent-color: var(--green, #1f9d55); }
.lib-access__others { background: #faf7f3; }
.lib-access__others .lib-access__pupils { padding-left: 0; }
@media (max-width: 560px) { .lib-access__pupils { padding-left: 8px; } .lib-access__pupils small { text-align: left; } }
[data-access].is-busy { opacity: .6; pointer-events: none; }
.lib-ex__options .is-correct { color: #1f7a45; font-weight: 700; }
.lib-ex__tools { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.lib-ex__audio { cursor: pointer; }
.lib-add-ex summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.lib-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lib-opt input[type=text] { flex: 1; }
.lib-card.is-busy { cursor: progress; }
.lib-card.is-busy button { pointer-events: none; opacity: .6; }
.lib-deleted-box { margin-top: 14px; }
.lib-deleted-box summary { cursor: pointer; color: var(--muted, #667); font-size: .9rem; }
.lib-deleted { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lib-deleted li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lesson-topic { display: grid; gap: 4px; margin: 0 0 14px; }
.lesson-topic label { display: grid; gap: 4px; font-weight: 700; }
.lesson-topic select { max-width: 100%; }
.topic-chip { color: #2f4fa8; font-weight: 700; }

/* CRM → «Ответы учеников» */
.ans-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.ans-card.is-new { border-left: 4px solid var(--gold, #f2bf4b); }
.ans-card header small { color: var(--muted, #667); }
.ans-card__q { margin: 0; white-space: pre-line; }
.ans-card__a { margin: 0; padding: 8px 10px; background: #f6f6f8; border-radius: 8px; font-size: 1.05rem; }
.ans-card__state { margin: 0; }
.ans-card__check { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ans-card__check input { flex: 1 1 220px; }

/* Кабинет ученика: уроки программы и упражнения */
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.topic-card { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.topic-card:hover { border-color: var(--ink); }
.topic-card small { color: var(--muted, #667); grid-column: 1; }
.topic-card span { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 800; }
.topic-view { margin-top: 14px; display: grid; gap: 18px; }
.topic-view h2 { margin: 0; }
.topic-view h3 { margin: 0 0 8px; font-size: 1.05rem; }
/* Разделы урока — вкладками; на телефоне листаются вбок */
.topic-tabs { display: flex; width: fit-content; max-width: 100%; justify-self: start; gap: 4px; padding: 4px; margin: 6px 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.topic-tabs::-webkit-scrollbar { display: none; }
.topic-tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font: inherit; font-weight: 800; color: var(--text); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.topic-tabs button:hover { background: #f6f1ea; }
.topic-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.topic-tabs small { opacity: .65; font-weight: 700; }
.topic-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.topic-file { display: inline-flex; align-items: center; gap: 8px; }
.topic-panel { animation: topic-in .25s ease both; }
@keyframes topic-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .topic-panel { animation: none; } }
.topic-links { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-hint { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.topic-file { max-width: 100%; white-space: normal; text-align: left; word-break: break-word; }
.topic-file small { opacity: .7; font-weight: 500; }
.ex-card .topic-file { justify-self: start; }
.topic-audio { display: grid; gap: 4px; margin: 0 0 10px; }
.topic-pages { display: grid; gap: 12px; }
.topic-pages a { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.topic-pages img { width: 100%; max-width: 820px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.topic-pages small { color: var(--muted, #667); }
/* Видео урока в кабинете: плеер + список роликов */
.topic-video { display: grid; gap: 10px; max-width: 860px; }
.tv-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #111; box-shadow: 0 10px 30px rgba(31, 43, 92, .18); }
.tv-stage iframe, .tv-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #111; }
.tv-file { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: linear-gradient(135deg, #1f2b5c, #2f3f80); }
.tv-file .tv-play { transform: scale(.6); }
.tv-cover { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #111; }
.tv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; transition: transform .3s, opacity .3s; }
.tv-cover:hover img, .tv-cover:focus-visible img { transform: scale(1.02); opacity: 1; }
.tv-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 16px; background: #c8202f; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .2s; }
.tv-cover:hover .tv-play { transform: scale(1.08); }
.tv-play::after { content: ''; position: absolute; left: 31px; top: 16px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.tv-now { margin: 0; font-weight: 700; font-size: 1.05rem; }
.tv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tv-list button { width: 100%; display: grid; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tv-list button:hover { border-color: var(--line, #e3e3ea); }
.tv-list button[aria-current=true] { border-color: #c8202f; }
.tv-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.tv-list span { font-size: .9rem; font-weight: 600; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .tv-cover img, .tv-play { transition: none; } }
/* Задания Wordwall в кабинете */
.ww-stage { aspect-ratio: 4 / 3; max-width: 760px; background: #fff; }
.ww-cover { background: #f6f6f8; }
.ww-cover img { opacity: 1; object-fit: contain; }
.ww-start { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 22px; border-radius: 999px; background: #c8202f; color: #fff;
  font-weight: 800; box-shadow: 0 10px 24px rgba(200, 32, 47, .45); transition: transform .2s; }
.ww-cover:hover .ww-start { transform: translateX(-50%) scale(1.05); }
.topic-ww .tv-list img { aspect-ratio: 4 / 3; object-fit: contain; background: #f6f6f8; }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ex-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: grid; gap: 8px; }
.ex-card__q { margin: 0; white-space: pre-line; }
.ex-form { display: grid; gap: 8px; }
.ex-form textarea { width: 100%; font: inherit; font-size: 1.05rem; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.ex-form .btn { justify-self: start; }
.ex-options { display: grid; gap: 6px; }
/* Выбранный вариант — нейтрально (зелёный цвет «.check» читался бы как «верно») */
.ex-options .check:has(input:checked) { border-color: var(--ink); background: #fff; }
.ex-options .check input { accent-color: var(--ink); }
.ex-state { margin: 0; font-weight: 700; color: var(--muted, #667); }
.ex-state.is-ok { color: #1f7a45; }
.ex-state.is-bad { color: #b3261e; }

/* ---------- «Обучение в Китае»: клиент в карточке обращения */
.deal-box h4 { margin: 18px 0 8px; font-size: 15px; }
.deal-box h4 small { color: var(--muted, #776); font-weight: 400; }
.china-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.china-list li { display: grid; grid-template-columns: minmax(140px, 1fr) auto minmax(120px, 1fr) auto; gap: 8px; align-items: center; }
.china-list li > span small { display: block; color: var(--muted, #776); }
.china-list li.admin-hint { display: block; }
@media (max-width: 640px) { .china-list li { grid-template-columns: 1fr auto; } }
.cred-text { white-space: pre-wrap; background: #f6f2ee; border-radius: 10px; padding: 12px; font-size: 13px; }

/* ---------- Личный кабинет: «Мой путь» (студенты «Обучения в Китае») */
.journey-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; }
.journey-card h2 { font-size: 20px; margin: 0 0 12px; }
.journey-card h2 small { color: var(--muted, #776); font-weight: 600; font-size: 14px; margin-left: 6px; }
.journey-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.journey-steps li { padding: 6px 12px; border-radius: 999px; background: #f3efeb; color: var(--muted, #776); font-size: 14px; font-weight: 700; }
.journey-steps li.is-done { background: #e6f4ea; color: #1e7b3a; }
.journey-steps li.is-now { background: var(--red, #c8102e); color: #fff; }
.journey-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.journey-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.journey-list li:last-child { border-bottom: 0; }
.journey-list li small { color: var(--muted, #776); white-space: nowrap; }
.journey-list li.is-done small, .journey-list small.is-done { color: #1e7b3a; font-weight: 700; }
.journey-list li.is-wait small { color: #9a6700; }

/* ---------- Единое правило CRM: строка / карточка открывается нажатием (стрелка «›», подсветка, фокус с клавиатуры) */
.is-openable { cursor: pointer; transition: background .12s; }
tr.is-openable:hover > td, li.is-openable:hover, .is-openable.week-trial:hover { background: #faf5f0; }
.is-openable:focus-within { outline: 2px solid rgba(200, 16, 46, .35); outline-offset: -2px; }
.open-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--ink); text-align: left; cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .12s, text-decoration-color .12s; }
.is-openable:hover .open-name, .open-name:focus-visible { color: var(--red); text-decoration-color: currentColor; outline: none; }
.open-chev { color: #b9aea6; font-size: 1.5rem; line-height: 1; font-weight: 400; padding-left: 6px; transition: color .12s, transform .12s; }
td.open-chev-cell { width: 28px; text-align: right; }
.is-openable:hover .open-chev { color: var(--red); transform: translateX(2px); }
.btn-quiet { border: 0; background: none; color: #8a7f78; font: inherit; font-weight: 700; font-size: .85rem; padding: 6px 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { color: var(--red); }
.admin-hint--inline { margin: 0; flex: 1 1 320px; }

/* ---------- Вкладки в карточках ученика и обращения */
.card-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1.5px solid var(--line); margin: 4px 0 14px; position: sticky; top: 0; background: #fff; z-index: 1; padding-top: 4px; }
.card-tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 800; color: #8a7f78; border-bottom: 3px solid transparent; margin-bottom: -1.5px; cursor: pointer; }
.card-tabs button:hover { color: var(--ink); }
.card-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.card-tabs button small { font-weight: 700; color: #8a7f78; margin-left: 2px; }
.card-tabs button small.is-alert { color: var(--red); }

/* «Ученики»: порядковый номер строки и номер ученика (ID для оплаты через Kaspi) */
.st-num { width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: 4px !important; }
.st-who { display: flex; align-items: flex-start; gap: 10px; }
.st-id { flex: none; min-width: 58px; margin-top: 1px; padding: 3px 8px; border-radius: 8px; background: var(--cream); border: 1px solid var(--line);
  color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-openable:hover .st-id { border-color: var(--red); color: var(--red); }
.st-code-badge { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--cream); border: 1px solid var(--line); font-size: .7em; font-weight: 800; font-variant-numeric: tabular-nums; vertical-align: middle; }
/* Незаполненное обязательное поле формы CRM */
.deal-grid [aria-invalid] { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
/* «Оплачено до» у ученика в форме отметок учителя */
.mark-paid { display: block; font-weight: 600; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.mark-paid.danger-text { color: var(--red); }
/* «Связь с координатором» (учитель) */
.req-box textarea { padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.req-item { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.req-item small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.req-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.chip-btn:hover { border-color: var(--ink); }
.req-item.is-done { background: #faf8f5; }
.req-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.req-answer { margin: 6px 0 0; font-size: .88rem; }
.req-status--off { color: var(--muted); }
.req-status { flex: none; font-size: .8rem; font-weight: 700; color: var(--gold-dark, #8a6d1f); white-space: nowrap; }
.req-status--done { color: #2f7d4f; white-space: normal; text-align: right; }
/* «Ученики»: город, дни, время — по строке на группу; «Акция» пока пустая */
.st-sched { white-space: nowrap; font-size: .9rem; }
.st-time { font-variant-numeric: tabular-nums; }
.st-promo { min-width: 60px; }
/* Карточка ученика: «К оплате» по урокам */
.pay-due { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); }
.pay-due small { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
.pay-due b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pay-due.is-debt b { color: var(--red); }
/* «Уроки»: ученики урока коротко после учителя */
.lesson-names { color: var(--muted); font-weight: 500; }
/* Дни ученика в группе (галочки) */
.enr-days { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.enr-days legend { font-size: .82rem; font-weight: 700; padding: 0 4px; }
/* «Деньги»: сводка сегодня / неделя / месяц (у продаж — «Мои продажи») */
.money-summary h3 { flex-basis: 100%; margin: 0 0 2px; font-size: 1rem; }
.money-summary small + b + small { display: block; color: var(--muted); font-size: .78rem; }
/* Канбан: переход к этапу, стрелки, высота по экрану (прокрутка колонок внутри), перетаскивание доски */
.kanban-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 8px; margin-bottom: 4px; }
.kanban-nav button { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.kanban-nav button small { color: var(--muted); font-weight: 600; }
.kanban-nav button.is-visible { border-color: var(--ink); }
.kanban-nav button:hover { border-color: var(--red); color: var(--red); }
.kanban-wrap { position: relative; }
.kanban { overflow-x: auto; overflow-y: hidden; cursor: grab; padding-bottom: 14px; }
.kanban.is-grabbing { cursor: grabbing; user-select: none; }
.kanban__col { display: flex; flex-direction: column; max-height: calc(100vh - 280px); min-height: 200px; }
.kanban__list { overflow-y: auto; min-height: 60px; flex: 1; padding-right: 2px; }
.kanban .deal-card { cursor: pointer; }
.kanban-arrow { position: absolute; top: 40%; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  box-shadow: 0 4px 14px rgba(30, 20, 22, .12); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }
.kanban-arrow:hover { color: var(--red); border-color: var(--red); }
.kanban-arrow--left { left: -8px; }
.kanban-arrow--right { right: -8px; }
.kanban-arrow[hidden] { display: none; }
@media (max-width: 720px) { .kanban__col { max-height: none; } .kanban-arrow { display: none; } }
/* «Деньги»: расходы и обзор месяца */
.money-month { display: inline-flex; align-items: center; gap: 8px; }
.money-month b { min-width: 120px; text-align: center; }
.money-breakdown { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.money-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.money-breakdown li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.money-overview .is-plus b { color: #2f7d4f; }
.money-overview .is-minus b { color: var(--red); }
/* Диаграммы «Обзора месяца» (charts.js) */
.chart { width: 100%; height: auto; display: block; font-family: inherit; }
.chart--wide { min-width: 520px; }
.chart-grid { stroke: #e7e3dc; stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 11px; }
.chart-value { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart-total { fill: var(--ink); font-size: 18px; font-weight: 800; }
.chart [data-tip] { cursor: default; }
.chart path[data-tip]:hover, .chart g[data-tip]:hover path { opacity: .85; }
.chart-donut { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 14px; align-items: center; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.chart-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; }
.chart-legend b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-legend small { color: var(--muted); min-width: 34px; text-align: right; }
.chart-legend--row { display: flex; gap: 16px; margin-bottom: 6px; }
.chart-legend--row li { display: flex; gap: 6px; }
[data-chart-year] { overflow-x: auto; }
.chart-tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: .82rem; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); max-width: 260px; }
.chart-tip[hidden] { display: none; }
@media (max-width: 560px) { .chart-donut { grid-template-columns: 1fr; } .chart-donut svg { max-width: 180px; margin: 0 auto; } }

/* ---------- CRM → «Скрипты» */
.sc-target { margin-bottom: 16px; position: relative; max-width: 640px; }
.sc-target__search { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 700; }
.sc-target__search input { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.sc-target__chosen { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: #fff7e0; }
.sc-suggest { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; z-index: 5; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); max-height: 320px; overflow: auto; }
.sc-suggest button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; cursor: pointer; }
.sc-suggest button:hover { background: #f5f1ec; }
.sc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.sc-cats { display: flex; flex-direction: column; gap: 6px; }
.sc-cat { border-radius: 12px; }
.sc-cat.is-active { background: #f5f1ec; }
.sc-cat__name { width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.sc-cat.is-active .sc-cat__name { color: var(--red); }
.sc-cat__name small { color: var(--muted); font-weight: 600; }
.sc-cat__tools, .sc-item__tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 10px; }
.sc-item__tools { padding: 0; margin-left: auto; }
.sc-cat__tools button, .sc-item__tools button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 8px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.sc-main__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.sc-main__head h3 { margin: 0; }
.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sc-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; }
.sc-item__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sc-item__body { white-space: pre-wrap; font-size: .92rem; line-height: 1.5; color: var(--ink); }
.sc-item__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.sc-ph { background: #fff1c2; border-radius: 4px; padding: 0 3px; color: inherit; }
.sc-result { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sc-result textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; line-height: 1.5; resize: vertical; }
.sc-result__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sc-missing { margin: 0 0 8px; font-size: .88rem; color: var(--red); }
.sc-phs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-dialog--wide { width: min(760px, calc(100vw - 32px)); }
.crm-dialog textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; line-height: 1.5; resize: vertical; }
@media (max-width: 760px) { .sc-layout { grid-template-columns: 1fr; } }
/* 🎂 урок в день рождения — бесплатно */
.jt-bday { font-size: .6rem; margin-left: 1px; }
.bday-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff1c2; font-size: .76rem; font-weight: 700; }

/* Время уроков — по Алматы: подсказка местного времени для тех, кто в другом часовом поясе (Китай) */
.tz-hint { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff3d3; color: #7a5a10; font-size: .78rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }

/* ------------------------------------------------ «Справочник» кабинета курсов (и предпросмотр в CRM) */
.hb-card > p { line-height: 1.6; }
.hb-note { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: #fff7e0; border-left: 4px solid #f2bf4b; line-height: 1.5; }
.hb-note--goal { background: #eef1fb; border-left-color: #1f2b5c; }
.hb-note--goal > b { flex: none; padding: 2px 10px; border-radius: 999px; background: #1f2b5c; color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.py { font-weight: 700; white-space: nowrap; }
.py .t1 { color: #d0342c; } .py .t2 { color: #e08a00; } .py .t3 { color: #1f9d55; } .py .t4 { color: #2f5bd3; } .py .t0 { color: #76696c; }
.hb-table { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.hb-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hb-table th { background: #f7f2ec; text-align: left; font-weight: 800; padding: 10px 12px; white-space: nowrap; }
.hb-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.hb-steps { margin: 8px 0 14px; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; }
.hb-steps li { counter-increment: step; display: flex; gap: 12px; align-items: baseline; line-height: 1.5; }
.hb-steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #c8202f; color: #fff; font-weight: 800; font-size: .85rem; }
.hb-quiz { display: grid; gap: 12px; margin: 10px 0 18px; }
.hb-q { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9; transition: border-color .2s, background .2s; }
.hb-q.is-done { border-color: #1f9d55; background: #f1faf4; }
.hb-q > p { margin: 0 0 10px; font-weight: 700; }
.hb-q__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-q__opts button { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; transition: transform .15s, border-color .15s; }
.hb-q__opts button:hover { border-color: #1f2b5c; transform: translateY(-1px); }
.hb-q__opts button.is-right { border-color: #1f9d55; background: #e7f6ed; color: #11663a; }
.hb-q__opts button.is-wrong { border-color: #d0342c; background: #fdecea; color: #a1241c; animation: hb-shake .35s; }
.hb-q__res { margin: 8px 0 0; min-height: 1.2em; font-size: .9rem; font-weight: 700; }
@keyframes hb-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hb-media { margin: 14px 0; }
.hb-media--video, .hb-media--ww { position: relative; aspect-ratio: 16 / 9; max-width: 760px; border-radius: 14px; overflow: hidden; background: #111; }
.hb-media--ww { aspect-ratio: 4 / 3; background: #f6f6f8; }
.hb-media iframe, .hb-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hb-yt, .hb-ww { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: transparent; }
.hb-yt img, .hb-ww img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-ww img { object-fit: contain; }
.hb-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: #c8202f; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.hb-play::after { content: ''; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.hb-start { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 9px 20px; border-radius: 999px; background: #c8202f; color: #fff; font-weight: 800; }
.hb-media--audio audio { width: min(100%, 460px); }
.hb-media--image img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.hb-missing { color: var(--muted); font-style: italic; }
.hb-ask { display: grid; gap: 8px; margin: 18px 0 8px; padding: 16px; border-radius: 14px; background: #f7f2ec; }
.hb-ask label { font-weight: 800; }
.hb-ask textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; }
.hb-ask .btn { justify-self: start; }
.hb-ask .form__error.is-ok { color: #1f9d55; }
.hb-questions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.hb-questions li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.hb-questions li.is-answered { border-color: #bfe3cc; }
.hb-qa__q small, .hb-qa__a small { color: var(--muted); font-size: .8rem; }
.hb-qa__q p, .hb-qa__a p { margin: 4px 0 0; line-height: 1.5; }
.hb-qa__a { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f1faf4; }
.hb-qa__wait { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.hb-empty { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hb-q__opts button.is-wrong { animation: none; } }
/* CRM: редактор справочника и вопросы учеников */
.hb-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.hb-tools__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.hb-preview { max-height: 640px; overflow: auto; padding: 18px 20px; }
.q-card textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.q-card__form { display: grid; gap: 8px; margin-top: 8px; }
.q-card__form > div { display: flex; gap: 8px; }
.q-card__answer { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #f1faf4; }
.q-card__answer p { margin: 4px 0 0; }

/* ---------- CRM → «КП» (конструктор коммерческих предложений) */
.kpc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.kpc-bar input[type="search"] { flex: 1 1 260px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; min-width: 0; }
.kpc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kpc-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; }
.kpc-row__main { display: grid; gap: 2px; min-width: 0; }
.kpc-row__main small { color: var(--muted); }
.kpc-row__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kpc-form h2 { margin: 0 0 6px; }
.kpc-sec { margin: 14px 0; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.kpc-sec h3 { margin: 0 0 10px; font-size: 1rem; }
.kpc-sec .deal-grid:last-child { margin-bottom: 0; }
.kpc-pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpc-pkg { display: grid; gap: 8px; align-content: start; min-width: 0; }
.kpc-pkg label, .kpc-sec .deal-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 700; }
.kpc-pkg input, .kpc-pkg textarea, .kpc-sec textarea, .kpc-bank input, .kpc-link input { padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; min-width: 0; width: 100%; box-sizing: border-box; }
.kpc-sec textarea, .kpc-pkg textarea { resize: vertical; }
.kpc-checks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.kpc-banks { display: grid; gap: 8px; margin-bottom: 10px; }
.kpc-bank { display: flex; gap: 8px; align-items: center; }
.kpc-link { display: flex; gap: 8px; align-items: center; margin: 14px 0; }
.kpc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kpc-form .form__error { margin: 10px 0 0; }
@media (max-width: 720px) {
  .kpc-pkgs { grid-template-columns: minmax(0, 1fr); }
  .kpc-row__actions .btn { flex: 1 1 auto; }
}
