/* Cante Platform. Значения из Cante Design System: design-system/ и артефакт дизайн-системы. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 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: 400 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: 400 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 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; }

:root {
  --blue-900: #0E1442; --blue-700: #1C29C7; --blue-600: #2D3CFF; --blue-400: #7C89FF;
  --blue-200: #C3CBFF; --blue-100: #E3E7FF; --blue-50: #F1F3FF;
  --white: #FFFFFF;
  --ink-900: #10122B; --ink-700: #3A3D5C; --ink-500: #585B7C; --ink-300: #A5A8C2; --ink-150: #DCDEEC; --ink-100: #ECEDF6;
  --line: #E1E4F5;
  --green-700: #17845A; --green-100: #DFF6EB; --success-text: #125F41;
  --rose-600: #D6416B; --rose-100: #FBE2E9; --danger-text: #8F1B3A;
  --amber-100: #FCEBD3; --amber-800: #7A5600;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-xs: 8px; --radius-sm: 14px; --radius-pill: 999px;
  --shadow-focus: 0 0 0 4px rgba(82, 98, 255, .28);
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blue-50); font-family: var(--font-sans); font-size: 15px; line-height: 1.55; color: var(--ink-900); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; }
.muted { color: var(--ink-500); }
.caption { color: var(--ink-500); font-size: 14px; line-height: 1.45; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }

/* ---------- каркас */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 0 220px; max-width: 100%; background: var(--blue-900); padding: var(--space-6) 14px; display: flex; flex-direction: column; gap: var(--space-1); }
.side__logo { display: block; padding: 0 12px var(--space-5); }
.side__logo img { display: block; height: 28px; }
.side a.nav { display: block; padding: 11px 12px; border-radius: var(--radius-xs); color: var(--blue-200); font-weight: 500; }
.side a.nav:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.side a.nav.is-active { color: var(--white); background: rgba(255, 255, 255, .14); font-weight: 600; }
.side__foot { margin-top: auto; padding: var(--space-4) 12px 0; color: var(--blue-200); font-size: 13px; display: flex; flex-direction: column; gap: var(--space-2); }
.side__foot strong { color: var(--white); font-size: 14px; }
.side__foot button { background: none; border: 0; padding: 0; color: var(--blue-200); cursor: pointer; text-align: left; font-size: 13px; text-decoration: underline; }
.main { flex: 999 1 560px; min-width: 0; padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.head { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.tools { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.split > .grow { flex: 999 1 520px; min-width: 0; }
.split > .aside { flex: 1 1 280px; max-width: 340px; min-width: 0; }
@media (max-width: 720px) { .split > .aside { max-width: none; } }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; color: var(--ink-500); }
.facts b { color: var(--ink-900); font-weight: 600; }

/* ---------- кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); border: 1.5px solid transparent; background: var(--blue-600); color: var(--white); font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.btn:hover { background: var(--blue-700); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--ink-900); border-color: var(--line); }
.btn--secondary:hover { background: var(--white); color: var(--ink-900); border-color: var(--blue-400); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.select, .input { min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--white); font-size: 15px; outline: none; max-width: 100%; }
select.select { padding-right: 34px; font-weight: 600; border-radius: var(--radius-pill); cursor: pointer; }
.input:focus, .select:focus { border-color: var(--blue-400); box-shadow: var(--shadow-focus); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, label.field > span { font-size: 14px; font-weight: 700; color: var(--ink-700); }
.field .input, .field .select { width: 100%; border-radius: var(--radius-sm); font-weight: 400; }
.monthnav { display: inline-flex; align-items: center; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-pill); min-height: 44px; }
.monthnav a { display: grid; place-items: center; width: 40px; height: 41px; color: var(--ink-700); font-weight: 700; border-radius: var(--radius-pill); }
.monthnav a:hover { background: var(--blue-50); }
.monthnav span { padding: 0 6px; font-weight: 600; min-width: 132px; text-align: center; }

/* ---------- карточки, плитки, таблицы */
.card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-6); }
.card--table { padding: var(--space-2) var(--space-2) 0; }
.card--table > h2 { padding: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); }
.tile { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-5); }
.tile__k { color: var(--ink-500); font-size: 14px; }
.tile__v { font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin-top: var(--space-2); }
.tile--inverse { background: var(--blue-900); border-color: var(--blue-900); }
.tile--inverse .tile__k { color: var(--blue-200); }
.tile--inverse .tile__v { color: var(--white); }
.tile--sm .tile__v { font-size: 24px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-500); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--ink-100); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; }
th.num, td.num { text-align: right; }
td.name { font-weight: 600; }
.empty { padding: var(--space-8) var(--space-6); text-align: center; color: var(--ink-500); }
.empty h2 { color: var(--ink-900); margin-bottom: var(--space-2); }

.status { display: inline-block; font-weight: 600; font-size: 13px; line-height: 1.4; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--ink-100); color: var(--ink-700); }
.status--ok { background: var(--green-100); color: var(--success-text); }
.status--bad { background: var(--rose-100); color: var(--danger-text); }
.status--wait { background: var(--amber-100); color: var(--amber-800); }
.tag { display: inline-block; background: var(--blue-100); color: var(--blue-700); font-weight: 600; font-size: 13px; padding: 3px 9px; border-radius: var(--radius-pill); }
.debt { color: var(--danger-text); font-weight: 700; }

.flash { display: flex; flex-direction: column; gap: var(--space-2); }
.flash div { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--blue-100); color: var(--blue-700); font-weight: 600; }
.flash .success { background: var(--green-100); color: var(--success-text); }
.flash .error { background: var(--rose-100); color: var(--danger-text); }

/* ---------- журнал */
.journal th, .journal td { padding: 10px 8px; text-align: center; }
.journal th:first-child, .journal td:first-child { text-align: left; padding-left: 14px; position: sticky; left: 0; background: var(--white); z-index: 1; }
.journal th.day { min-width: 46px; }
.journal th.day small { display: block; font-weight: 500; color: var(--ink-300); font-size: 11px; }
.mark { width: 36px; height: 36px; border-radius: var(--radius-xs); border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-weight: 800; font-size: 15px; line-height: 1; color: transparent; }
.mark:hover { border-color: var(--blue-400); }
.mark[data-state="yes"] { background: var(--green-100); border-color: var(--green-100); color: var(--success-text); }
.mark[data-state="no"] { background: var(--rose-100); border-color: var(--rose-100); color: var(--danger-text); }
.mark[aria-busy="true"] { opacity: .5; }

.bar { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; padding: var(--space-4) var(--space-6); }
.bar h2 { margin-right: auto; }
.bar__total { font-size: 19px; font-weight: 800; }

/* ---------- задачи */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-5); align-items: start; }
.col { background: var(--ink-100); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: var(--space-3); }
.col h2 { font-size: 15px; padding: 4px 6px; }
.task { background: var(--white); border-radius: 12px; padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.task__title { font-weight: 600; }
.task--done .task__title { color: var(--ink-500); }
.task__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: 13px; color: var(--ink-500); }
.task__move { display: flex; flex-wrap: wrap; gap: 6px; }
.late { color: var(--danger-text); font-weight: 600; }

details.add > summary { list-style: none; cursor: pointer; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: var(--space-4); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-4); align-items: end; }
.inline { display: inline; }
.inline-form { display: flex; gap: var(--space-2); align-items: center; }
.inline-form .input { min-height: 36px; width: 96px; border-radius: var(--radius-xs); padding: 0 10px; }

/* ---------- вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.login__card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: var(--space-5); }
.login__card img { height: 32px; align-self: flex-start; }

@media (max-width: 720px) {
  .main { padding: var(--space-5) var(--space-4); }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-3) var(--space-4); }
  .side__logo { padding: 0 var(--space-3) 0 0; }
  .side__foot { margin: 0 0 0 auto; padding: 0; flex-direction: row; align-items: center; }
  .side__foot span { display: none; }
}
@media print {
  .side, .noprint { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .card { border: 0; padding: 0; }
}

/* ---------- быстрые отметки */
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--ink-150); border-bottom-width: 2px; border-radius: 6px; background: var(--white); font: 600 12px var(--font-sans); color: var(--ink-700); text-align: center; }
.journal th.day.is-today { background: var(--blue-50); border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.journal th.day a { color: inherit; display: block; }
.colmenu { position: relative; }
.colmenu > summary { list-style: none; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-xs); color: var(--ink-700); }
.colmenu > summary::-webkit-details-marker { display: none; }
.colmenu > summary:hover, .colmenu[open] > summary { background: var(--blue-100); color: var(--blue-700); }
.colmenu > form { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; min-width: 190px; padding: 6px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 12px 28px rgba(16, 18, 43, .14); }
.colmenu > form button { padding: 10px 12px; border: 0; background: none; text-align: left; font-weight: 600; font-size: 14px; border-radius: var(--radius-xs); cursor: pointer; color: var(--ink-900); }
.colmenu > form button:hover { background: var(--blue-50); }
.journal thead th { overflow: visible; }
.card--table:has(.colmenu) .scroll { padding-bottom: 4px; min-height: 240px; }
.mark[data-state="done"] { background: var(--green-100); border-color: var(--green-100); color: var(--success-text); }
.mark[data-state="cancelled"] { background: var(--rose-100); border-color: var(--rose-100); color: var(--danger-text); }
.grid td.name { font-weight: 600; white-space: nowrap; }
.grid td.name .muted { font-weight: 400; }
.tabs { display: inline-flex; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-pill); padding: 3px; min-height: 44px; }
.tabs a { display: grid; place-items: center; padding: 0 16px; border-radius: var(--radius-pill); font-weight: 600; color: var(--ink-700); }
.tabs a.is-active { background: var(--blue-600); color: var(--white); }

/* ---------- дашборд: графики. Цвета рядов проверены на различимость, в том числе при дальтонизме */
:root { --series-1: #2D3CFF; --series-2: #EB6834; --series-3: #4A3AA7; --series-4: #1BAF7A; }
.s1 { fill: var(--series-1); background: var(--series-1); }
.s2 { fill: var(--series-2); background: var(--series-2); }
.s3 { fill: var(--series-3); background: var(--series-3); }
.s4 { fill: var(--series-4); background: var(--series-4); }
.kpis { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.hero {  display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; justify-content: space-between; padding: var(--space-6); }
.hero__v { font-weight: 800; font-size: 52px; line-height: 1.05; letter-spacing: -0.04em; color: var(--white); margin: var(--space-2) 0 var(--space-3); }
.tile__foot { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: flex-end; justify-content: space-between; margin-top: var(--space-3); }
.delta { font-size: 13px; color: var(--ink-500); line-height: 1.4; }
.delta--on-dark { color: var(--blue-200); }
.delta__mark { font-weight: 700; white-space: nowrap; }
.delta--good { color: var(--green-700); }
.delta--bad { color: var(--danger-text); }
.delta--flat { color: var(--ink-700); }
.delta--on-dark .delta--good { color: #7BE0B0; }
.delta--on-dark .delta--bad { color: #FF9DB6; }
.delta--on-dark .delta--flat { color: var(--white); }
.spark { flex: none; overflow: visible; }
.spark polyline { fill: none; stroke: var(--ink-300); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--blue-600); stroke: var(--white); stroke-width: 2; }
.spark--hero polyline { stroke: var(--blue-400); }
.spark--hero circle { fill: var(--white); stroke: var(--blue-900); }
.charts { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-4); align-items: start; }
.charts--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.chart figcaption { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: baseline; justify-content: space-between; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 13px; color: var(--ink-700); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart__plot { position: relative; }
.chart__plot svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--ink-100); stroke-width: 1; }
.chart .axis { stroke: var(--ink-150); stroke-width: 1; }
.chart .tick { fill: var(--ink-500); font: 500 12px var(--font-sans); font-variant-numeric: tabular-nums; }
.chart .tick--strong { fill: var(--ink-900); font-weight: 700; }
.chart .hit { fill: transparent; }
.chart .group { outline: none; cursor: default; }
.chart .group:hover .hit, .chart .group:focus-visible .hit { fill: var(--blue-50); }
.chart .group:not(.is-current) path { opacity: .55; }
.chart .group:hover path, .chart .group:focus-visible path { opacity: 1; }
.tip { position: absolute; z-index: 3; pointer-events: none; min-width: 190px; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--ink-900); color: var(--white); font-size: 13px; box-shadow: 0 12px 28px rgba(16, 18, 43, .2); }
.tip__title { color: var(--blue-200); margin-bottom: 6px; }
.tip__row { display: flex; align-items: center; gap: 8px; }
.tip__row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.tip__key { width: 12px; height: 3px; border-radius: 2px; flex: none; background: transparent; }
.stackbar { display: flex; gap: 2px; height: 20px; }
.stackbar span { min-width: 3px; }
.stackbar span:first-child { border-radius: 4px 0 0 4px; }
.stackbar span:last-child { border-radius: 0 4px 4px 0; }
.keyrows, .todo, .hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.keyrows { gap: var(--space-2); }
.keyrows li { display: grid; grid-template-columns: 10px 1fr auto 44px; gap: 10px; align-items: center; font-size: 14px; }
.keyrows li b { font-variant-numeric: tabular-nums; }
.keyrows li .muted { text-align: right; font-variant-numeric: tabular-nums; }
.todo li + li { border-top: 1px solid var(--ink-100); }
.todo a { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink-900); font-size: 14px; min-height: 44px; }
.todo a:hover { color: var(--blue-700); }
.todo .status { min-width: 34px; text-align: center; }
.todo__go { margin-left: auto; color: var(--ink-300); font-size: 18px; }
.hbars { gap: var(--space-4); }
.hbars__head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.hbars__head .name { font-weight: 600; }
.hbars__head b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbars__track { height: 12px; margin: 6px 0 4px; }
.hbars__track span { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; }
.section { margin-top: var(--space-2); }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hero { grid-column: 1 / -1; } }
@media (max-width: 980px) { .charts, .charts--even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } .hero__v { font-size: 40px; } }

/* ---------- окно создания и корзина задач */
.dialog { width: min(560px, calc(100vw - 32px)); padding: var(--space-6); border: 0; border-radius: 22px; background: var(--white); color: var(--ink-900); box-shadow: 0 24px 60px rgba(16, 18, 43, .28); }
.dialog::backdrop { background: rgba(14, 20, 66, .45); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.dialog__close, .task__del { display: grid; place-items: center; flex: none; border: 0; background: none; border-radius: var(--radius-pill); color: var(--ink-500); cursor: pointer; line-height: 1; }
.dialog__close { width: 44px; height: 44px; font-size: 28px; margin: -8px -8px -8px 0; }
.dialog__close:hover, .task__del:hover { background: var(--ink-100); color: var(--ink-900); }
.task__top { display: flex; gap: var(--space-2); align-items: flex-start; justify-content: space-between; }
.task__del { width: 32px; height: 32px; font-size: 22px; margin: -6px -8px 0 0; }
.task__del:hover { background: var(--rose-100); color: var(--danger-text); }

/* ---------- документы */
.folders { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.folder { display: flex; flex-direction: column; gap: 6px; padding: var(--space-5); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-900); transition: border-color .15s ease; }
.folder svg { color: var(--blue-600); }
.folder:hover { border-color: var(--blue-400); color: var(--ink-900); }
.folder.is-active { border-color: var(--blue-600); background: var(--blue-50); }
.folder__name { font-weight: 700; }
.input--file { padding: 9px 12px; height: auto; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-4); }
.photo { margin: 0; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.photo img, .photo__file { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-100); }
.photo__file { display: grid; place-items: center; font-weight: 700; color: var(--ink-500); }
.photo figcaption { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 10px 12px; font-size: 14px; font-weight: 600; }
.photo figcaption .task__del { margin: 0; }

/* ---------- вход через сторонние сервисы (пока не подключён) */
.sso { display: flex; flex-direction: column; gap: var(--space-2); }
.sso__or { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-500); font-size: 13px; }
.sso__or::before, .sso__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso .btn { gap: 10px; }
.sso .btn:disabled { opacity: 1; color: var(--ink-500); background: var(--blue-50); border-color: var(--line); }
.sso__soon { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--ink-100); color: var(--ink-700); padding: 2px 8px; border-radius: var(--radius-pill); }

/* ---------- доска задач: пять колонок, перетаскивание, архив */
.btn svg { flex: none; }
.board-scroll { overflow-x: auto; padding-bottom: var(--space-2); }
.board { grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: var(--space-3); }
.col { padding: 10px; }
.task { padding: 14px; }
.col { min-height: 140px; transition: background .15s ease, box-shadow .15s ease; }
.col h2 { display: flex; align-items: center; gap: var(--space-2); }
.col__count { font-size: 12px; font-weight: 700; color: var(--ink-700); background: var(--white); border-radius: var(--radius-pill); padding: 2px 9px; }
.col__empty { padding: 4px 6px; }
.col.is-over { background: var(--blue-100); box-shadow: inset 0 0 0 2px var(--blue-400); }
.task { cursor: grab; }
.task.is-dragging { opacity: .45; }
.task__del { width: 32px; height: 32px; margin: -6px -8px 0 0; }
.task__del svg { width: 16px; height: 16px; }
.select--sm { min-height: 36px; font-size: 13px; padding: 0 30px 0 12px; width: 100%; }
.task__move { display: block; }

/* ---------- единые кнопки и списки */
.btn { padding: 0 20px; gap: 8px; }
.btn--sm { padding: 0 14px; }
select.select { -webkit-appearance: none; appearance: none; padding: 0 44px 0 18px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233A3D5C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.field select.select { padding: 0 44px 0 14px; }
select.select--sm { padding: 0 38px 0 14px; background-position: right 13px center; background-size: 14px; }
.field .input { padding: 0 14px; }

/* ---------- микро-взаимодействия */
.btn, .mark, .seg__btn, .folder, .task, .week__day, .tabs a { transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease; }
.btn:active:not(:disabled), .seg__btn:active { transform: scale(.97); }
.mark:active { transform: scale(.9); }
.mark.is-pop { animation: pop .22s ease; }
.task:hover, .folder:hover { box-shadow: 0 8px 20px rgba(45, 60, 255, .1); }
.task:active { cursor: grabbing; }
.dialog[open] { animation: rise .18s ease; }
.dialog[open]::backdrop { animation: fade .18s ease; }
.dialog--confirm { width: min(440px, calc(100vw - 32px)); }
.toasts { position: fixed; top: var(--space-4); right: var(--space-4); z-index: 20; display: flex; flex-direction: column; gap: var(--space-2); width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: var(--space-3); padding: 12px 12px 12px 16px; border-radius: var(--radius-sm); background: var(--ink-900); color: var(--white); font-weight: 600; font-size: 14px; box-shadow: 0 12px 28px rgba(16, 18, 43, .22); animation: slide .22s ease; }
.toast.success { background: #0F5A3D; }
.toast.error { background: var(--danger-text); }
.toast.is-leaving { opacity: 0; transform: translateX(12px); transition: opacity .2s ease, transform .2s ease; }
.toast__close { margin-left: auto; flex: none; width: 28px; height: 28px; border: 0; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .14); color: var(--white); font-size: 18px; line-height: 1; cursor: pointer; }
.toast__close:hover { background: rgba(255, 255, 255, .26); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- кабинет преподавателя */
.week { display: grid; grid-template-columns: 40px repeat(7, minmax(0, 1fr)) 40px; gap: var(--space-2); align-items: stretch; }
.week__nav { display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--white); border: 1.5px solid var(--line); color: var(--ink-700); font-weight: 700; font-size: 18px; }
.week__day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--radius-sm); background: var(--white); border: 1.5px solid var(--line); color: var(--ink-900); min-height: 76px; }
.week__day:hover, .week__nav:hover { border-color: var(--blue-400); color: var(--ink-900); }
.week__dow { font-size: 12px; font-weight: 600; color: var(--ink-500); text-transform: capitalize; }
.week__num { font-size: 19px; font-weight: 800; line-height: 1.2; }
.week__count { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.week__day.is-today { border-color: var(--blue-200); background: var(--blue-50); }
.week__day.is-active { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.week__day.is-active .week__dow, .week__day.is-active .week__count { color: var(--blue-100); }
.lesson { display: flex; flex-direction: column; gap: var(--space-4); }
.lesson__head { display: flex; gap: var(--space-3); align-items: flex-start; justify-content: space-between; }
.lesson__time { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.lesson__time .muted { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.lesson__what { font-weight: 600; }
.lesson__what .muted { font-weight: 400; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; padding: 8px 0; }
.roster li + li { border-top: 1px solid var(--ink-100); }
.roster__name { font-weight: 600; min-width: 0; }
.seg { display: inline-flex; flex: none; border: 1.5px solid var(--line); border-radius: var(--radius-pill); padding: 3px; background: var(--white); }
.seg__btn { min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: none; font-weight: 600; font-size: 14px; color: var(--ink-700); cursor: pointer; }
.seg__btn:hover { background: var(--blue-50); }
.seg__btn--yes[aria-pressed="true"] { background: var(--green-100); color: var(--success-text); }
.seg__btn--no[aria-pressed="true"] { background: var(--rose-100); color: var(--danger-text); }
.seg[aria-busy="true"] { opacity: .5; }
@media (max-width: 560px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } .week__nav { display: none; } .week__count { font-size: 11px; } }

/* ---------- стекло, иконки и градиент бренда (по Cante Design System, как на сайте) */
:root {
  --glass: rgba(255, 255, 255, .66); --glass-strong: rgba(255, 255, 255, .82); --glass-line: rgba(255, 255, 255, .9);
  --glass-blur: saturate(170%) blur(20px);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 2px rgba(16, 18, 43, .04), 0 18px 40px rgba(45, 60, 255, .08);
  --grad-brand: linear-gradient(135deg, #2D3CFF 0%, #5A4EFF 100%);
}
body { background:
    radial-gradient(900px 520px at 88% -8%, #E4DEFB 0%, rgba(228, 222, 251, 0) 62%),
    radial-gradient(760px 520px at 30% 108%, #C3CBFF 0%, rgba(195, 203, 255, 0) 60%),
    radial-gradient(620px 420px at 62% 44%, #EFEAFC 0%, rgba(239, 234, 252, 0) 65%),
    var(--blue-50);
  background-attachment: fixed; }
.icon { flex: none; }
.card, .tile, .folder, .week__day, .week__nav, .monthnav, .tabs, .photo, .task {
  background: var(--glass); border-color: var(--glass-line); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.task { background: var(--glass-strong); border: 1.5px solid var(--glass-line); }
.col { background: rgba(255, 255, 255, .34); border: 1.5px solid var(--glass-line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.btn--secondary, select.select, .input, .seg { background-color: var(--glass-strong); border-color: rgba(45, 60, 255, .14); }
.btn--secondary:hover { background-color: var(--white); }
.input:focus, select.select:focus { background-color: var(--white); }
.journal th:first-child, .journal td:first-child { background: #FAFAFF; }
.mark { background: var(--white); }
.dialog { background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1.5px solid var(--glass-line); }
.dialog::backdrop { background: rgba(14, 20, 66, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.colmenu > form { background: rgba(255, 255, 255, .96); }

.btn:not(.btn--secondary) { background: var(--grad-brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 22px rgba(45, 60, 255, .26); }
.btn:not(.btn--secondary):hover { background: linear-gradient(135deg, #1C29C7 0%, #4A3FE6 100%); }
.btn:not(.btn--secondary):disabled { box-shadow: none; }
.btn--sm:not(.btn--secondary) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px rgba(45, 60, 255, .22); }
.tabs a.is-active, .week__day.is-active { background: var(--grad-brand); border-color: transparent; box-shadow: 0 8px 18px rgba(45, 60, 255, .26); }

.side { background: radial-gradient(420px 320px at 0% 0%, rgba(90, 78, 255, .55) 0%, rgba(90, 78, 255, 0) 70%), linear-gradient(180deg, #0E1442 0%, #141B5C 100%); }
.side a.nav { display: flex; align-items: center; gap: 12px; }
.side a.nav .icon { opacity: .8; }
.side a.nav.is-active { background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.side a.nav.is-active .icon { opacity: 1; }
.side__foot button { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.side__foot button:hover { color: var(--white); }

.chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); flex: none; box-shadow: inset 0 0 0 1px rgba(45, 60, 255, .1); }
.chip--glass { background: rgba(255, 255, 255, .16); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.tile { position: relative; display: flex; flex-direction: column; }
.tile > .chip { position: absolute; top: var(--space-4); right: var(--space-4); }
.tile .tile__k { padding-right: 52px; }
.tile__foot { margin-top: auto; padding-top: var(--space-3); }
.tile--inverse, .hero { background: radial-gradient(360px 240px at 100% 0%, rgba(124, 137, 255, .55) 0%, rgba(124, 137, 255, 0) 70%), linear-gradient(135deg, #0E1442 0%, #1C29C7 100%);
  border-color: transparent; box-shadow: 0 20px 44px rgba(28, 41, 199, .28); }
.hero { position: relative; }
.hero > .chip { position: absolute; top: var(--space-5); right: var(--space-5); }
.chart figcaption, .chart__head { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; justify-content: space-between; }
.chart figcaption .legend { order: 3; width: 100%; }
.section { display: flex; align-items: center; gap: 10px; }
.section .icon { color: var(--blue-600); }
.folder svg { color: var(--blue-600); }
.empty { color: var(--ink-500); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .tile, .folder, .week__day, .week__nav, .monthnav, .tabs, .photo, .task, .col { background: var(--white); }
}
@media (max-width: 720px) { .side a.nav { padding: 9px 10px; } .side a.nav span { display: none; } .side a.nav.is-active span { display: inline; } }
.hero { flex-direction: row; align-items: flex-end; }
.hero .tile__k { padding-right: 0; }

/* ---------- цвет статуса на доске задач: серый бэклог, синий к выполнению, жёлтый в работе, лавандовый на проверке, зелёный готово */
.col[data-status] { --st-bg: var(--ink-100); --st-line: var(--ink-150); --st-ink: var(--ink-700); --st-dot: var(--ink-300); }
.col[data-status="todo"] { --st-bg: var(--blue-100); --st-line: var(--blue-200); --st-ink: var(--blue-700); --st-dot: var(--blue-600); }
.col[data-status="doing"] { --st-bg: #FFF1B8; --st-line: #F2D46B; --st-ink: var(--amber-800); --st-dot: #E0A800; }
.col[data-status="review"] { --st-bg: #E4DEFB; --st-line: #C9BDF5; --st-ink: #4A3AA7; --st-dot: #7B4DFF; }
.col[data-status="done"] { --st-bg: var(--green-100); --st-line: #B4E6CF; --st-ink: var(--success-text); --st-dot: var(--green-700); }
.col[data-status] h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--st-dot); flex: none; }
.col[data-status] .col__count { background: var(--st-bg); color: var(--st-ink); }
.col[data-status] .task { background: var(--st-bg); border-color: var(--st-line); box-shadow: 0 1px 2px rgba(16, 18, 43, .04); -webkit-backdrop-filter: none; backdrop-filter: none; }
.col[data-status] .task:hover { box-shadow: 0 8px 20px rgba(16, 18, 43, .1); }
.col[data-status] .task .tag { background: rgba(255, 255, 255, .7); color: var(--st-ink); }
.col[data-status] .task .task__meta { color: var(--ink-700); }
.col[data-status] .task .late { color: var(--danger-text); }
.col[data-status] .task select.select { background-color: rgba(255, 255, 255, .8); border-color: var(--st-line); }
.col[data-status] .task__del { color: var(--st-ink); }
.col[data-status="done"] .task .task__title { color: var(--success-text); }

/* ---------- меню: плавающая панель высотой в один экран, остаётся на месте при прокрутке */
@media (min-width: 721px) {
  .shell { flex-wrap: nowrap; align-items: flex-start; }
  .side { flex: 0 0 236px; position: sticky; top: var(--space-4); height: calc(100vh - 2 * var(--space-4)); margin: var(--space-4) 0 var(--space-4) var(--space-4);
    border-radius: 28px; overflow-y: auto; box-shadow: 0 24px 48px rgba(14, 20, 66, .22); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .main { flex: 1 1 auto; }
}
@media (max-width: 720px) {
  .side { margin: var(--space-3) var(--space-3) 0; border-radius: 22px; box-shadow: 0 12px 28px rgba(14, 20, 66, .2); }
}
@media print { .main { padding: 0; } }

/* ---------- страница входа */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); }
.auth__brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-8); padding: clamp(28px, 4vw, 56px); border-radius: 32px; color: var(--white);
  background: radial-gradient(520px 380px at 0% 100%, rgba(90, 78, 255, .6) 0%, rgba(90, 78, 255, 0) 70%), linear-gradient(140deg, #0E1442 0%, #1C29C7 62%, #2D3CFF 100%);
  box-shadow: 0 30px 60px rgba(14, 20, 66, .28); }
.auth__art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth__logo, .auth__pitch, .auth__foot { position: relative; }
.auth__logo { height: 34px; align-self: flex-start; }
.auth__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--blue-200); margin-bottom: var(--space-3); }
.auth__brand h1 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.auth__points { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); max-width: 440px; }
.auth__points li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.auth__points li span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; color: var(--blue-100); }
.auth__points b { color: var(--white); font-size: 15px; font-weight: 700; }
.auth__foot { font-size: 13px; color: var(--blue-200); }
.auth__main { display: grid; place-items: center; padding: var(--space-6) var(--space-4); }
.auth__card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-5); padding: clamp(24px, 3vw, 36px); border-radius: 28px;
  background: var(--glass-strong); border: 1.5px solid var(--glass-line); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); animation: rise .3s ease; }
.auth__title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.auth__error { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--rose-100); color: var(--danger-text); font-weight: 600; font-size: 14px; }
.auth__help { text-align: center; }
.inputbox { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 16px; border: 1.5px solid rgba(45, 60, 255, .14); background: var(--white); color: var(--ink-500); transition: border-color .15s ease, box-shadow .15s ease; }
.inputbox:focus-within { border-color: var(--blue-400); box-shadow: var(--shadow-focus); color: var(--blue-600); }
.inputbox input { flex: 1; min-width: 0; height: 48px; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink-900); }
.inputbox input::placeholder { color: var(--ink-300); }
.inputbox__toggle { flex: none; border: 0; background: none; padding: 8px 6px; font-size: 13px; font-weight: 700; color: var(--blue-600); cursor: pointer; border-radius: var(--radius-xs); }
.inputbox__toggle:hover { color: var(--blue-700); background: var(--blue-50); }
.btn--lg { min-height: 54px; font-size: 16px; font-weight: 700; }
.btn--lg .icon { transition: transform .15s ease; }
.btn--lg:hover .icon { transform: translateX(3px); }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__brand { padding: 24px; border-radius: 24px; gap: var(--space-5); }
  .auth__brand h1 { font-size: 28px; }
  .auth__points, .auth__foot { display: none; }
  .auth__main { padding: var(--space-2) 0 var(--space-6); place-items: start center; }
}

/* ---------- заявки */
.board--4 { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.col[data-status="new"] { --st-bg: var(--blue-100); --st-line: var(--blue-200); --st-ink: var(--blue-700); --st-dot: var(--blue-600); }
.col[data-status="contacted"] { --st-bg: #FFF1B8; --st-line: #F2D46B; --st-ink: var(--amber-800); --st-dot: #E0A800; }
.col[data-status="agreed"] { --st-bg: var(--green-100); --st-line: #B4E6CF; --st-ink: var(--success-text); --st-dot: var(--green-700); }
.col[data-status="lost"] { --st-bg: var(--ink-100); --st-line: var(--ink-150); --st-ink: var(--ink-700); --st-dot: var(--ink-300); }
a.task__title { color: var(--ink-900); }
a.task__title:hover { color: var(--blue-700); text-decoration: underline; }
.lead-card__msg { font-size: 14px; color: var(--ink-700); line-height: 1.45; }
.lead-card__links { display: flex; flex-wrap: wrap; gap: 6px; }
.task__meta .icon { vertical-align: -2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-500); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
textarea.input { min-height: 0; line-height: 1.5; resize: vertical; }

/* ---------- мобильная версия: верхняя полоса, нижнее меню, таблицы карточками */
.topbar, .tabbar { display: none; }
.sheet { width: 100%; max-width: 560px; margin: auto auto 0; padding: 10px var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 26px 26px 0 0;
  background: rgba(255, 255, 255, .96); color: var(--ink-900); box-shadow: 0 -12px 40px rgba(14, 20, 66, .2); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.sheet[open] { display: flex; flex-direction: column; gap: var(--space-4); animation: sheet-up .22s ease; }
.sheet::backdrop { background: rgba(14, 20, 66, .38); }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--ink-150); align-self: center; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__head > div { display: flex; flex-direction: column; }
.sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.sheet__grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--blue-50); color: var(--ink-900); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.25; }
.sheet__grid a .icon { color: var(--blue-600); }
.sheet__grid a:active { transform: scale(.97); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.roster__name small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-500); }

@media (max-width: 720px) {
  .side { display: none; }
  .shell { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); position: sticky; top: 0; z-index: 15;
    padding: calc(10px + env(safe-area-inset-top, 0px)) var(--space-4) 10px; background: linear-gradient(135deg, #0E1442 0%, #1C29C7 100%); box-shadow: 0 6px 20px rgba(14, 20, 66, .2); }
  .topbar__logo img { display: block; height: 24px; }
  .topbar__user { color: var(--blue-200); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .main { padding: var(--space-5) var(--space-4) calc(96px + env(safe-area-inset-bottom, 0px)); gap: var(--space-5); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 16;
    padding: 6px; border-radius: 24px; background: rgba(14, 20, 66, .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 14px 34px rgba(14, 20, 66, .35); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border: 0; border-radius: 18px; background: none; color: var(--blue-200); font: 600 11px var(--font-sans); cursor: pointer; min-height: 52px; }
  .tabbar .is-active { background: rgba(255, 255, 255, .16); color: var(--white); }
  .tabbar span { white-space: nowrap; }
  .toasts { top: auto; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); right: var(--space-4); }

  h1 { font-size: 26px; }
  .head { gap: var(--space-3); }
  .head .tools { width: 100%; }
  .head .tools .btn { flex: 1 1 auto; }

  /* Таблицы превращаются в карточки: подпись столбца слева, значение справа. */
  table.stack-sm, table.stack-sm tbody, table.stack-sm tfoot, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm thead { display: none; }
  table.stack-sm tr { padding: 12px 14px; border-bottom: 1px solid var(--ink-100); }
  table.stack-sm tbody tr:last-child { border-bottom: 0; }
  table.stack-sm td { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 5px 0; border: 0; white-space: normal; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); color: var(--ink-500); font-size: 13px; font-weight: 500; text-align: left; flex: none; max-width: 50%; }
  table.stack-sm td:empty, table.stack-sm td[data-label=""]::before { display: none; }
  table.stack-sm td:first-child { font-size: 16px; font-weight: 700; text-align: left; padding-bottom: 8px; }
  table.stack-sm td:first-child::before { display: none; }
  table.stack-sm tfoot tr { background: var(--blue-50); border-radius: 0 0 12px 12px; }
  table.stack-sm .inline-form { justify-content: flex-end; flex-wrap: wrap; }
  .card--table { padding: 0; overflow: hidden; }
  .card--table > h2 { padding: 16px 14px 4px; }
  .scroll:has(> table.stack-sm) { overflow: visible; }

  /* Доски задач и заявок листаются по одной колонке. */
  .board-scroll { margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4) var(--space-2); scroll-snap-type: x mandatory; scroll-padding: 0 var(--space-4); }
  .board, .board--4 { grid-template-columns: repeat(5, 84vw); }
  .board--4 { grid-template-columns: repeat(4, 84vw); }
  .col { scroll-snap-align: start; }

  /* Сводка АВР компактнее. */
  .bar { padding: var(--space-4); gap: var(--space-2) var(--space-3); }
  .bar h2 { width: 100%; }
  .bar > form, .bar > a { flex: 1 1 140px; }
  .bar > form .btn, .bar > a { width: 100%; }

  .roster li { align-items: center; }
  .seg__btn { padding: 0 12px; }
  .kpis { gap: var(--space-3); }
  .hero__v { font-size: 40px; }
}

/* ================= Мобильные экраны: общие элементы ================= */
@media (min-width: 721px) { .m-only { display: none !important; } }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip-f { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--white); color: var(--ink-900); font-weight: 600; font-size: 15px; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .12); }
.chip-f.is-active { background: var(--blue-600); color: var(--white); box-shadow: none; }
.list-card { list-style: none; margin: 0; padding: 0; background: var(--white); border-radius: 12px; overflow: hidden; }
.list-card__head { padding: 12px 16px 4px; font-size: 13px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: .02em; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; margin-bottom: 8px; }
.sec-head h2 { font-size: 20px; }
.sec-head__more { font-weight: 600; }
.group-sec { display: flex; flex-direction: column; }
.stack-m { display: flex; flex-direction: column; gap: 12px; }
.empty-s { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px; text-align: center; color: var(--ink-500); }
.empty-s .icon { color: var(--blue-400); }
.avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-weight: 700; font-size: 15px; }
.datebox { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50); line-height: 1.1; }
.datebox b { font-size: 17px; }
.datebox small { font-size: 11px; color: var(--ink-500); text-transform: capitalize; }
.datebox.is-today { background: var(--blue-600); color: var(--white); }
.datebox.is-today small { color: var(--blue-100); }
.todo a, .todo__row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 52px; color: var(--ink-900); }
.list-card.todo li + li { border-top: 0; position: relative; }
.list-card.todo li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: rgba(60, 60, 67, .2); }
.todo a > span:nth-child(2), .todo__row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.todo small { color: var(--ink-500); font-size: 13px; }
.todo b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-300); }
.dot--todo, .dot--new { background: var(--blue-600); } .dot--doing, .dot--contacted { background: #E0A800; }
.dot--review { background: #7B4DFF; } .dot--done, .dot--agreed { background: var(--green-700); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--white); color: var(--ink-900); font-size: 13px; font-weight: 600; }
.quick__item .icon { color: var(--blue-600); }
.money { display: flex; align-items: center; gap: 16px; color: var(--ink-900); }
.money > div:first-child { display: flex; flex-direction: column; flex: 1; }
.money b { font-size: 28px; font-weight: 700; }
.money__side { display: flex; flex-direction: column; text-align: right; font-weight: 600; }
.chev { color: var(--ink-300); font-size: 22px; }
/* строка урока */
.lrows { list-style: none; margin: 0; padding: 0; }
.lrow { display: flex; gap: 14px; padding: 12px 16px; position: relative; }
.lrow + .lrow::before { content: ""; position: absolute; top: 0; left: 74px; right: 0; height: .5px; background: rgba(60, 60, 67, .2); }
.lrow__time { flex: none; width: 44px; font-weight: 700; font-size: 17px; line-height: 1.2; }
.lrow__time small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-500); }
.lrow__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lrow__title { font-weight: 600; }
.lrow__sub { font-size: 14px; color: var(--ink-500); }
.lrow__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; }
.lseg { display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 8px; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, .12); max-width: 280px; }
.lseg__btn { min-height: 34px; border: 0; border-radius: 7px; background: none; font-weight: 600; font-size: 14px; color: var(--ink-900); cursor: pointer; }
.lseg__btn--done[aria-pressed="true"] { background: #34C759; color: var(--white); }
.lseg__btn--cancel[aria-pressed="true"] { background: #FF3B30; color: var(--white); }
.lseg[aria-busy="true"] { opacity: .5; }
/* АВР одной строкой */
.act-m summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; list-style: none; cursor: pointer; }
.act-m summary::-webkit-details-marker { display: none; }
.act-m summary > span:first-child { display: flex; flex-direction: column; flex: 1; }
.act-m summary small { color: var(--ink-500); font-size: 13px; }
.act-m__sum { font-weight: 700; }
.act-m[open] .todo__go { transform: rotate(90deg); }
.act-m__body { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.act-m__body .btn { width: 100%; }
/* зарплата раскрывающейся строкой */
.pay summary { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; list-style: none; cursor: pointer; }
.pay summary::-webkit-details-marker { display: none; }
.pay summary > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pay summary small { color: var(--ink-500); font-size: 13px; }
.pay__sum { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 700; }
.pay + .pay { border-top: .5px solid rgba(60, 60, 67, .2); }
.pay__body { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 16px; }
.topbar__left, .topbar__right { display: none; }

@media (max-width: 720px) {
  .chips.m-only, .stack-m.m-only, .group-sec.m-only { display: flex !important; }
  .d-only { display: none !important; }
  .head .caption { display: none; }
  .main > .head:first-of-type h1, .main > .head h1 { font-size: 30px; line-height: 36px; }
  .main > .facts { font-size: 14px; }

  .topbar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .topbar__left, .topbar__right { display: flex; align-items: center; min-height: 44px; }
  .topbar__right { justify-content: flex-end; }
  .topbar__back { font-size: 17px; color: var(--tint); white-space: nowrap; }
  .topbar:has(.topbar__back) .topbar__title { opacity: 1; }

  /* Главная плитка остаётся тёмной: на ней белый текст. */
  .tile--inverse, .hero { background: linear-gradient(135deg, #0E1442 0%, #1C29C7 100%) !important; }
  .card.money, .card.empty-s { padding: 16px; }

  /* Неделя в расписании */
  .stack-m .week { grid-template-columns: 32px repeat(7, minmax(0, 1fr)) 32px; gap: 4px; }
  .stack-m .week__nav { display: grid; font-size: 17px; }
  .week__day { min-height: 64px; padding: 8px 2px; border-radius: 10px; }
  .week__num { font-size: 17px; }

  /* Доски: колонки друг под другом, переход по чипам. */
  .board-scroll { overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
  .board, .board--4 { display: flex !important; flex-direction: column; gap: 20px; }
  .col { scroll-margin-top: 60px; }
  .col.is-empty .col__empty { display: none; }
  .col.is-empty { min-height: 0; }
  .task { padding: 14px 16px; }

  /* Вход: карточка не шире экрана. */
  .auth { display: flex; flex-direction: column; gap: 12px; min-height: 100vh; }
  .auth__main { display: block; padding: 0; }
  .auth__card { max-width: none; margin: 0; padding: 20px 16px; border-radius: 12px; }
  .auth__brand { padding: 20px; gap: 14px; }
  .auth__brand h1 { font-size: 24px; line-height: 1.15; }
  .auth__art { opacity: .6; }
  .inputbox { background: rgba(118, 118, 128, .12); }
  .sso .btn { font-size: 15px; }

  .quick__item, .chip-f, .lrow__link { -webkit-user-select: none; user-select: none; }
}

/* ---------- телефон: действия в верхней полосе, карточка контакта, списки */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.contact a, .contact button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 0; border-radius: 12px; background: var(--white); color: var(--blue-600); font: 600 13px var(--font-sans); cursor: pointer; }
.contact form { display: contents; }
.contact button { color: #FF3B30; }
.cta { display: flex; align-items: center; gap: 12px; color: var(--ink-900); }
.cta > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.cta small { color: var(--ink-500); font-size: 13px; }
.avatar--sq { border-radius: 10px; background: var(--blue-50); color: var(--blue-600); }
.amount { flex: none; font-weight: 700; white-space: nowrap; }
@media (max-width: 720px) {
  .topbar__action { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--tint); cursor: pointer; border-radius: 50%; }
  .topbar__action:active { background: rgba(45, 60, 255, .1); }
  .contact { display: grid !important; }
  .cta.m-only { display: flex !important; }
  .tabs + .chips, .stack-m > .tabs { margin-top: 0; }
  /* Документы: папки списком, как в «Файлах». */
  .folders { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: 12px; overflow: hidden; }
  .folder { flex-direction: row; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; border-radius: 0; position: relative; }
  .folder + .folder::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: .5px; background: rgba(60, 60, 67, .2); }
  .folder svg { width: 26px; height: 26px; }
  .folder__name { flex: 1; font-weight: 500; }
  .folder .caption { font-size: 15px; }
  .folder::after { content: ""; width: 8px; height: 8px; border-right: 2px solid rgba(60, 60, 67, .3); border-top: 2px solid rgba(60, 60, 67, .3); transform: rotate(45deg); flex: none; }
  .folder.is-active { background: var(--blue-50); }
  .todo .caption { flex: none; }
}

@media (max-width: 720px) {
  /* Плитки с цифрами: главная во всю ширину, остальные по две в ряд и без графиков. */
  .kpis, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .kpis > .hero, .tiles > .tile--inverse { grid-column: 1 / -1; }
  .kpis > .tile:last-child:nth-child(even) { grid-column: 1 / -1; }
  .kpis .tile:not(.hero) .spark, .kpis .tile:not(.hero) > .chip, .tiles .tile:not(.tile--inverse) > .chip { display: none; }
  .kpis .tile:not(.hero) .tile__k, .tiles .tile .tile__k { padding-right: 0; font-size: 13px; }
  .kpis .tile:not(.hero) .tile__v, .tiles .tile:not(.tile--inverse) .tile__v { font-size: 20px; margin-top: 4px; }
  .tiles .tile .delta, .kpis .tile:not(.hero) .delta { font-size: 12px; }
  .tile__foot { padding-top: 6px; }
  .hero .spark--hero { width: 100%; max-width: 220px; height: 48px; }
  /* Поля внутри белых списков видны на сером. */
  .list-card .input, .list-card select.select { background-color: rgba(118, 118, 128, .12); }
  .pay .kv { font-size: 15px; }
  .status { white-space: nowrap; }
  .lesson__head .status { flex: none; }
}

/* ---------- раскрывающиеся блоки: стрелка показывает, что блок открывается, и поворачивается при раскрытии */
.disclose > summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; border-radius: 12px; -webkit-user-select: none; user-select: none; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary h2 { flex: 1; margin: 0; }
.disclose > summary .chip { width: 36px; height: 36px; border-radius: 10px; }
.disc { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(118, 118, 128, .12); color: var(--ink-700); transition: transform .25s ease, background .2s ease; }
.disclose[open] > summary .disc { transform: rotate(180deg); background: var(--blue-100); color: var(--blue-700); }
.disclose > summary:hover .disc { background: var(--blue-100); color: var(--blue-700); }
.disclose > summary:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; }
details.add.disclose[open] > summary { margin-bottom: var(--space-4); }
.disclose > .is-animating { overflow: hidden; }
.pay.disclose > summary { border-radius: 0; }
.pay.disclose > summary:active, .act-m.disclose > summary:active { background: rgba(60, 60, 67, .06); }
.act-m .disc { margin-left: 4px; }
@media (max-width: 720px) {
  .tiles > .tile:not(.tile--inverse):last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ================= Телефон в стиле Cante Design System =================
   Тот же язык, что на компьютере: шрифт Manrope, фон blue-50 с мягкими пятнами, стеклянные карточки,
   градиент бренда на главных кнопках, кнопки-пилюли, тёмно-синее меню. От iOS остаются удобства:
   вкладки внизу, касания не меньше 44 px, поля 16 px (Safari не увеличивает страницу), отступы под вырез экрана. */
.sheet__list { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--glass-strong); border: 1.5px solid var(--glass-line); }
.sheet__list a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 16px; color: var(--ink-900); font-weight: 600; position: relative; }
.sheet__list a + a::before { content: ""; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--ink-100); }
.sheet__list a::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-300); border-top: 2px solid var(--ink-300); transform: rotate(45deg); }
.sheet__list a .icon { color: var(--blue-600); }
.sheet__list a:active { background: var(--blue-50); }

@media (max-width: 720px) {
  :root { --tint: #2D3CFF; }
  html { -webkit-tap-highlight-color: transparent; }
  body { font-size: 16px; line-height: 1.5; }
  button, input, select, textarea, a { touch-action: manipulation; }

  /* Верхняя полоса: стекло, заголовок раздела появляется при прокрутке. */
  .topbar { justify-content: center; min-height: 52px; padding: env(safe-area-inset-top, 0px) 16px 0; background: rgba(241, 243, 255, .72);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: none; transition: box-shadow .2s ease; }
  .topbar.is-scrolled { box-shadow: 0 1px 0 rgba(45, 60, 255, .1), 0 8px 24px rgba(45, 60, 255, .06); }
  .topbar__title { font-size: 16px; font-weight: 700; color: var(--ink-900); line-height: 52px; opacity: 0; transition: opacity .2s ease; letter-spacing: -0.01em; }
  .topbar.is-scrolled .topbar__title { opacity: 1; }
  .topbar__back { font-weight: 700; font-size: 16px; }
  .main { padding: 4px 16px calc(84px + env(safe-area-inset-bottom, 0px) + 16px); gap: 18px; }
  .main > .head h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
  h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
  .sec-head h2 { font-size: 19px; }
  .eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .09em; color: var(--blue-600); }

  /* Нижнее меню: тёмно-синее, как боковая панель на компьютере. */
  .tabbar { left: 0; right: 0; bottom: 0; border-radius: 24px 24px 0 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); gap: 4px;
    background: radial-gradient(320px 160px at 0% 0%, rgba(90, 78, 255, .5) 0%, rgba(90, 78, 255, 0) 70%), linear-gradient(180deg, rgba(20, 27, 92, .96) 0%, rgba(14, 20, 66, .98) 100%);
    box-shadow: 0 -10px 30px rgba(14, 20, 66, .18); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .tabbar a, .tabbar button { min-height: 52px; padding: 6px 0 4px; gap: 3px; border-radius: 16px; color: var(--blue-200); font: 600 11px/13px var(--font-sans); }
  .tabbar .icon { width: 23px; height: 23px; stroke-width: 2; }
  .tabbar .is-active { background: rgba(255, 255, 255, .16); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

  /* Карточки и списки: стекло бренда, радиус 14 (radius-sm). */
  .card, .tile, .folder, .photo, .week__day, .week__nav, .monthnav, .lesson, .auth__card, .list-card, .folders, .quick__item, .chip-f, .contact a, .contact button, .sheet__list {
    background: var(--glass); border: 1.5px solid var(--glass-line); box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
  .card, .list-card, .folders, .lesson { border-radius: 18px; }
  .tile, .quick__item, .contact a, .contact button, .week__day, .week__nav, .monthnav { border-radius: 16px; }
  .folders .folder { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { padding: 16px; }
  .tile { padding: 14px 16px; }
  .tile__k { font-size: 13px; color: var(--ink-500); }
  .tile__v { font-weight: 800; letter-spacing: -0.02em; }
  .tile > .chip, .hero > .chip { width: 36px; height: 36px; border-radius: 12px; top: 12px; right: 12px; }
  .tile--inverse, .hero { background: radial-gradient(360px 240px at 100% 0%, rgba(124, 137, 255, .55) 0%, rgba(124, 137, 255, 0) 70%), linear-gradient(135deg, #0E1442 0%, #1C29C7 100%) !important;
    border: 0; border-radius: 20px; box-shadow: 0 16px 36px rgba(28, 41, 199, .28); padding: 18px; }
  .hero__v { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; }
  .list-card__head { color: var(--blue-700); font-weight: 800; letter-spacing: .06em; font-size: 12px; }
  .list-card.todo li + li::before, .lrow + .lrow::before, .folder + .folder::before, .pay + .pay { background: var(--ink-100); }
  .pay + .pay { border-top: 1px solid var(--ink-100); }

  /* Кнопки: пилюли, главная с градиентом бренда, второстепенная стеклянная. */
  .btn { min-height: 48px; padding: 0 20px; border-radius: var(--radius-pill); font: 700 16px var(--font-sans); }
  .btn:not(.btn--secondary) { background: var(--grad-brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 22px rgba(45, 60, 255, .26); }
  .btn--secondary { background: var(--glass-strong); border: 1.5px solid rgba(45, 60, 255, .14); color: var(--ink-900); }
  .btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
  .btn:active:not(:disabled) { transform: scale(.98); }

  /* Поля: белые, рамка бренда, 16 px. */
  .input, select.select, .inputbox { min-height: 48px; font: 500 16px var(--font-sans); border-radius: 14px; border: 1.5px solid rgba(45, 60, 255, .14); background-color: var(--white); box-shadow: none; }
  select.select { padding: 0 42px 0 14px; background-position: right 14px center; font-weight: 600; }
  .input:focus, select.select:focus, .inputbox:focus-within { border-color: var(--blue-400); box-shadow: var(--shadow-focus); }
  .field > label { font-size: 14px; font-weight: 700; color: var(--ink-700); text-transform: none; letter-spacing: 0; padding-left: 0; }
  .inline-form .input { width: 100px; }
  .inputbox { background: var(--white); }

  /* Переключатели: стеклянная дорожка, выбранный сегмент с градиентом. */
  .tabs { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; min-height: 44px; padding: 4px; border-radius: var(--radius-pill); background: var(--glass); border: 1.5px solid var(--glass-line); box-shadow: var(--glass-shadow); }
  .tabs a { min-height: 36px; border-radius: var(--radius-pill); font: 700 14px var(--font-sans); color: var(--ink-700); }
  .tabs a.is-active { background: var(--grad-brand); color: var(--white); box-shadow: 0 6px 14px rgba(45, 60, 255, .26); }
  .chip-f { border-radius: var(--radius-pill); font: 700 14px var(--font-sans); min-height: 38px; color: var(--ink-700); }
  .chip-f.is-active { background: var(--grad-brand); color: var(--white); border-color: transparent; box-shadow: 0 6px 14px rgba(45, 60, 255, .24); }
  .week__day.is-active, .datebox.is-today { background: var(--grad-brand); color: var(--white); border-color: transparent; box-shadow: 0 6px 14px rgba(45, 60, 255, .26); }
  .monthnav a { color: var(--blue-600); }
  .monthnav span { font: 700 16px var(--font-sans); }

  /* «Был / Не был» и «Проведён / Отменён»: цвета статусов из дизайн-системы. */
  .seg, .lseg { border: 1.5px solid rgba(45, 60, 255, .12); background: var(--white); border-radius: var(--radius-pill); padding: 3px; }
  .seg__btn, .lseg__btn { min-height: 36px; border-radius: var(--radius-pill); font: 700 14px var(--font-sans); color: var(--ink-700); }
  .seg__btn--yes[aria-pressed="true"], .lseg__btn--done[aria-pressed="true"] { background: var(--green-100); color: var(--success-text); }
  .seg__btn--no[aria-pressed="true"], .lseg__btn--cancel[aria-pressed="true"] { background: var(--rose-100); color: var(--danger-text); }

  /* Таблицы-карточки. */
  .card--table { padding: 0; }
  table.stack-sm tbody tr + tr { border-top: 1px solid var(--ink-100); }
  table.stack-sm td { min-height: 44px; padding: 9px 16px; font-size: 15px; color: var(--ink-900); }
  table.stack-sm td + td::after { background: var(--ink-100); height: 1px; }
  table.stack-sm td::before { color: var(--ink-500); font-size: 14px; font-weight: 500; }
  table.stack-sm td:first-child { font-size: 16px; font-weight: 800; padding-top: 14px; }
  table.stack-sm tfoot tr { background: var(--blue-50); }

  /* Доски. */
  .col { background: transparent; border: 0; padding: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .col h2 { padding: 4px 4px 8px; font-size: 15px; font-weight: 800; color: var(--ink-900); text-transform: none; letter-spacing: -0.01em; }
  .col[data-status] .task { border-radius: 18px; }

  /* Окна: подтверждение и лист «Ещё» в стиле бренда. */
  .dialog { border-radius: 22px; padding: 22px 18px 18px; }
  .dialog--confirm { width: min(340px, calc(100vw - 32px)); }
  .dialog--confirm .tools { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
  .dialog--confirm [data-confirm-ok].is-danger { background: linear-gradient(135deg, #D6416B 0%, #B4234A 100%); box-shadow: 0 10px 22px rgba(214, 65, 107, .28); }
  .sheet { border-radius: 26px 26px 0 0; background: rgba(241, 243, 255, .97); padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .sheet .btn--secondary { color: var(--danger-text); }

  /* Сообщения над нижним меню. */
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .toast { border-radius: 16px; }

  .contact a, .contact button { font-weight: 700; }
  .contact button { color: var(--danger-text); }
  .auth__brand { border-radius: 22px; }
  .auth__card { border-radius: 22px; }
}
/* Карточка входа видна сразу: появление только сдвигом, без исчезающей прозрачности. */
.auth__card { animation: lift .35s ease; }
@keyframes lift { from { transform: translateY(10px); } to { transform: none; } }

/* Глазик у пароля: открытый показывает пароль, перечёркнутый прячет. */
.inputbox__toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border-radius: 50%; color: var(--ink-500); }
.inputbox__toggle:hover { color: var(--blue-600); background: var(--blue-50); }
.inputbox__toggle[aria-pressed="true"] { color: var(--blue-600); }
.inputbox__toggle span { display: grid; }

/* «Сегодня»: школы свёрнутыми карточками, по нажатию раскрываются с уроками. */
.school-cards { display: flex; flex-direction: column; gap: 10px; }
.school-card > summary { padding: 14px 16px; border-radius: 18px; }
.school-card__main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.school-card__main b { font-weight: 800; font-size: 16px; }
.school-card__main small { color: var(--ink-500); font-size: 13px; line-height: 1.35; }
.progress { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--ink-100); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 2px; background: var(--grad-brand); transition: width .3s ease; }
.school-card[open] > summary { border-bottom: 1px solid var(--ink-100); border-radius: 18px 18px 0 0; }
.school-card .lrows { padding: 4px 0; }
.school-card .status { flex: none; }

/* Только просмотр (директор): отметки показаны, но не нажимаются. */
.mark.is-readonly { display: inline-grid; place-items: center; cursor: default; }
.lrow__ro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.lrow__ro .lrow__link { margin-top: 0; }
@media (max-width: 720px) {
  /* Колонки и карточки досок во всю ширину: одинаковый размер независимо от длины текста. */
  .board, .board--4 { align-items: stretch !important; }
  .board > .col, .col > .task { width: 100%; box-sizing: border-box; }
}

/* ---------- выбор месяца, свёрнутые блоки дашборда */
.month-pick { display: contents; }
.month-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--glass-line); background: var(--glass-strong); box-shadow: var(--glass-shadow); color: var(--ink-900); font: 700 15px var(--font-sans); cursor: pointer; white-space: nowrap; }
.month-chip .icon:first-child { color: var(--blue-600); }
.month-sheet[open] { gap: 14px; }
.month-sheet__head { display: grid; grid-template-columns: 44px 1fr 44px 44px; align-items: center; text-align: center; }
.month-sheet__head strong { font-size: 19px; font-weight: 800; }
.month-sheet__arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--blue-600); font-size: 22px; font-weight: 700; }
.month-sheet__arrow:active { background: var(--blue-50); }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.month-grid a { display: grid; place-items: center; min-height: 48px; border-radius: 14px; background: var(--white); border: 1.5px solid rgba(45, 60, 255, .1); color: var(--ink-900); font-weight: 700; font-size: 15px; }
.month-grid a.is-now { border-color: var(--blue-400); }
.month-grid a.is-active { background: var(--grad-brand); color: var(--white); border-color: transparent; box-shadow: 0 8px 18px rgba(45, 60, 255, .26); }
details.chart > summary { margin: -4px -4px 0; padding: 4px; }
details.chart > summary .sum-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
details.chart > summary .sum-main small { color: var(--ink-500); font-size: 13px; font-weight: 500; }
details.chart > summary .chip { width: 40px; height: 40px; }
details.chart[open] > summary { margin-bottom: 12px; }
.chart__body { display: flex; flex-direction: column; gap: var(--space-4); }
.delta__ctx { white-space: nowrap; }

@media (max-width: 720px) {
  .head:has(.tools--month) { flex-wrap: nowrap; align-items: center; }
  .head .tools.tools--month { width: auto; flex: none; }
  .main > .head:has(.tools--month) h1 { font-size: 28px; }
  /* Чистая прибыль компактной плиткой: цифра и график в одну строку. */
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .kpis > .hero { grid-column: 1 / -1; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; }
  .kpis > .hero > .chip { display: none; }
  .kpis > .hero > div { flex: 1; min-width: 0; }
  .kpis > .hero .hero__v { font-size: 30px; margin: 2px 0 2px; }
  .kpis > .hero .spark--hero { width: 96px; height: 44px; flex: none; }
  .kpis > .hero .delta { font-size: 12px; }
  .kpis > .tile:not(.hero) { grid-column: auto !important; padding: 10px 12px; border-radius: 14px; }
  .kpis > .tile:not(.hero) .tile__k { font-size: 12px; line-height: 1.25; min-height: 30px; }
  .kpis > .tile:not(.hero) .tile__v { font-size: 15px; margin-top: 2px; white-space: nowrap; }
  .kpis > .tile:not(.hero) .delta__ctx { display: none; }
  .kpis > .tile:not(.hero) .tile__foot { padding-top: 2px; }
  details.chart { padding: 12px 14px; }
  details.chart > summary h2 { font-size: 16px; }
  .charts, .charts--even { gap: 10px; }
  .charts .stack { gap: 10px; }
}

details.chart { gap: 0; }
details.chart > .chart__body { margin-top: 0; }

/* ---------- кабинет на телефоне: одна компактная плитка с начислением и счётчиками */
.cab-hero { border-radius: 20px; padding: 16px 18px; color: var(--white); align-items: center; justify-content: space-between; gap: 12px;
  background: radial-gradient(300px 200px at 100% 0%, rgba(124, 137, 255, .55) 0%, rgba(124, 137, 255, 0) 70%), linear-gradient(135deg, #0E1442 0%, #1C29C7 100%);
  box-shadow: 0 16px 36px rgba(28, 41, 199, .26); }
.cab-hero__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cab-hero__k { font-size: 13px; color: var(--blue-200); }
.cab-hero__main b { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; }
.cab-hero__state { font-size: 12px; color: var(--blue-200); }
.cab-hero__stats { display: flex; flex-direction: column; gap: 6px; flex: none; }
.cab-hero__stats span { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); font-size: 13px; color: var(--blue-100); white-space: nowrap; }
.cab-hero__stats b { font-size: 16px; font-weight: 800; color: var(--white); }
@media (max-width: 720px) {
  .cab-hero.m-only { display: flex !important; }
  .head:has(.tools--inline) { flex-wrap: nowrap; align-items: center; }
  .head .tools.tools--inline { width: auto; flex: 0 1 auto; min-width: 0; }
  .head .tools--inline select.select { max-width: 58vw; min-height: 44px; }
  .main > .head:has(.tools--inline) h1 { font-size: 28px; }
  .head h1 .m-only { display: inline !important; }
}

/* Действие в верхней полосе: пилюля с понятной подписью, а не голый «+». */
@media (max-width: 720px) {
  .topbar { min-height: 48px; }
  .topbar__title { line-height: 48px; }
  .topbar__action { width: auto; height: 36px; margin-right: -4px; padding: 0 14px 0 10px; gap: 4px; display: inline-flex; align-items: center;
    border-radius: var(--radius-pill); background: var(--grad-brand); color: var(--white); font: 700 14px var(--font-sans);
    box-shadow: 0 6px 14px rgba(45, 60, 255, .26); white-space: nowrap; }
  .topbar__action .icon { width: 18px; height: 18px; stroke-width: 2.4; }
  .topbar__action:active { transform: scale(.97); background: var(--grad-brand); }
}

/* ---------- нижнее меню: парящая стеклянная капсула (как вкладки в iOS 26), выбранный раздел с градиентом бренда */
@media (max-width: 720px) {
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 5px; gap: 2px; border-radius: 32px;
    background: rgba(255, 255, 255, .74); border: 1.5px solid rgba(255, 255, 255, .92);
    box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(16, 18, 43, .06), 0 14px 34px rgba(14, 20, 66, .16);
    -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
  .tabbar a, .tabbar button { min-height: 54px; padding: 7px 0 5px; gap: 3px; border-radius: 26px; color: var(--ink-500); font: 700 11px/13px var(--font-sans); }
  .tabbar .icon { width: 22px; height: 22px; stroke-width: 2; }
  .tabbar a:active, .tabbar button:active { background: var(--blue-50); }
  .tabbar .is-active { background: var(--grad-brand); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px rgba(45, 60, 255, .3); }
  .tabbar .is-active .icon { stroke-width: 2.2; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px) + 16px); }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- выбор школы и группы: кнопка с текущим значением открывает список снизу */
.pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.pick-chip { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 12px 6px 8px; border-radius: 16px;
  border: 1.5px solid var(--glass-line); background: var(--glass-strong); box-shadow: var(--glass-shadow); color: var(--ink-900); cursor: pointer; text-align: left; font-family: var(--font-sans); }
.pick-chip__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--blue-50); color: var(--blue-600); }
.pick-chip__text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.pick-chip__text small { font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .06em; }
.pick-chip__text b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chip > .icon:last-child { flex: none; color: var(--ink-500); }
.pick-chip:active { transform: scale(.98); }
.pick-sheet[open] { gap: 12px; max-height: 80vh; }
.pick-sheet .sheet__head strong { font-size: 19px; font-weight: 800; }
.pick-sheet .sheet__list { overflow-y: auto; }
.pick-sheet .sheet__list a::after { display: none; }
.pick-sheet .sheet__list a.is-active { color: var(--blue-700); }
.pick-check { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad-brand); color: var(--white); }
.pickers { grid-template-columns: minmax(0, 1fr); }
.pick-check .icon { color: var(--white); stroke-width: 2.6; }

/* Дашборд в центре меню директора: значок крупнее, чтобы главный раздел читался сразу. */
@media (max-width: 720px) {
  .tabbar .tabbar__center .icon { width: 25px; height: 25px; }
  .tabbar .tabbar__center:not(.is-active) { color: var(--blue-700); }
}

/* Нижнее меню: тёмно-синяя капсула бренда, чтобы не сливалась с белыми карточками; контент над ней плавно растворяется. */
@media (max-width: 720px) {
  .tabbar { background: var(--blue-900); border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 2px 6px rgba(14, 20, 66, .18), 0 18px 40px rgba(14, 20, 66, .34);
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tabbar a, .tabbar button { color: rgba(255, 255, 255, .62); }
  .tabbar a:active, .tabbar button:active { background: rgba(255, 255, 255, .08); }
  .tabbar .is-active { background: var(--grad-brand); color: var(--white);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 16px rgba(45, 60, 255, .45); }
  .tabbar .tabbar__center:not(.is-active) { color: #b9c0ff; }
  body:has(.tabbar)::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; pointer-events: none;
    height: calc(96px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom, rgba(233, 236, 255, 0), rgba(233, 236, 255, .96) 62%); }
}

/* Экран кодового слова перед входом */
.auth__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); font-size: 12.5px; font-weight: 700; }
.auth__kicker .icon { width: 14px; height: 14px; }
.auth__note { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--blue-50); color: var(--ink-500); font-size: 13.5px; line-height: 1.45; }
.auth__note b { color: var(--ink-900); font-size: 14px; }
a.auth__help { text-decoration: none; color: var(--blue-700); font-weight: 600; text-align: center; }

/* Левая панель входа без рекламного текста: только логотип и фирменная графика. На телефоне — компактная полоса с логотипом. */
.auth__brand { justify-content: space-between; }
.auth__logo { height: 44px; }
@media (max-width: 720px) {
  .auth__logo { height: 30px; }
}

/* Фотографии Cante на панели входа: концерт, урок, лагерь — живые кадры вместо пустоты. */
.auth__photos { position: relative; flex: 1; min-height: 300px; margin: var(--space-4) 0; }
.auth__photo { position: absolute; margin: 0; overflow: hidden; border-radius: 26px; border: 4px solid rgba(255, 255, 255, .9);
  box-shadow: 0 24px 50px rgba(8, 12, 50, .38); background: var(--blue-700); }
.auth__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.auth__photo--a { left: 0; top: 4%; width: 58%; aspect-ratio: 4 / 3; rotate: -5deg; }
.auth__photo--b { right: 0; top: 30%; width: 50%; aspect-ratio: 3 / 2; rotate: 4deg; z-index: 2; }
.auth__photo--c { left: 16%; bottom: 0; width: 34%; aspect-ratio: 3 / 4; rotate: -2deg; z-index: 1; }
.auth__foot { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--blue-200); }
.auth__foot b { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; letter-spacing: -0.02em; color: var(--white); }
/* Телефон: баннер занимает всё место над формой и подстраивается под высоту экрана; фото масштабируются по высоте баннера. */
@media (max-width: 720px) {
  .auth { min-height: 100vh; min-height: 100dvh; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .auth__main { flex: none; }
  .auth__brand { flex: 1 1 auto; min-height: 96px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 18px 20px; }
  .auth__photos { display: block; flex: 1 1 0; min-height: 0; margin: 12px 0 10px; container-type: size; }
  .auth__photo { border-width: 3px; border-radius: 18px; box-shadow: 0 14px 30px rgba(8, 12, 50, .35); max-width: 46%; }
  .auth__photo--a { width: auto; height: 70%; top: 0; left: 0; }
  .auth__photo--c { width: auto; height: 90%; bottom: 0; left: 34%; z-index: 1; }
  .auth__photo--b { width: auto; height: 62%; top: 20%; right: 0; z-index: 2; }
  .auth__foot { font-size: 13px; }
  .auth__foot b { font-size: 19px; }
}
/* Если места над формой мало (маленький телефон), фото и подпись прячутся, остаётся полоса с логотипом. */
@container (max-height: 150px) { .auth__photo { display: none; } }
@media (max-width: 720px) and (max-height: 700px) { .auth__foot { display: none; } }

/* ---------- дашборд, вторая часть: ученики, воронка, посещаемость, нагрузка, долги, цель 2029 */
.kpis--four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--space-4); }
@media (max-width: 1180px) { .kpis--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .kpis.kpis--four { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.funnel .hbars__head .muted { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.subhead { margin: var(--space-5) 0 var(--space-3); font-size: 15px; }
.hbars--compact { gap: var(--space-2); }
.hbars--compact .hbars__track { height: 8px; }
.hbars__track--split { display: flex; gap: 2px; }
.hbars__track--split span { border-radius: 0; }
.hbars__track--split span:last-child { border-radius: 0 4px 4px 0; }
.s1.soft, .sw--soft { background: var(--blue-200); }
.heat-card { margin-bottom: var(--space-4); }
table.heat { border-collapse: separate; border-spacing: 3px; width: 100%; }
table.heat th, table.heat td { border: 0; padding: 0; }
table.heat thead th { font-size: 12px; font-weight: 600; color: var(--ink-500); text-align: center; padding: 0 0 4px; }
table.heat thead th:first-child { text-align: left; }
table.heat tbody th { text-align: left; padding-right: 12px; min-width: 170px; font-weight: 400; white-space: nowrap; }
table.heat tbody th b { display: block; font-size: 14px; }
table.heat tbody th small { display: block; font-size: 12px; color: var(--ink-500); }
table.heat td { height: 34px; min-width: 44px; border-radius: 8px; text-align: center; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
table.heat td.num { background: none; padding-left: 10px; text-align: right; }
.heat--good { background: #1BAF7A; color: #fff; }
.heat--ok { background: #A8E6CB; color: #0E4A33; }
.heat--warn { background: #FCD9A8; color: #7A4A00; }
.heat--bad { background: #F4A3B5; color: #6E1129; }
.heat--none { background: var(--ink-100); color: var(--ink-300); }
.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.goal .progress { height: 10px; border-radius: 5px; margin: 8px 0 6px; }
.goal .progress span { border-radius: 5px; }
@media (max-width: 900px) { .goals { grid-template-columns: minmax(0, 1fr); } }
.funnel .hbars__head .name, .goal .hbars__head .name { flex: 1; min-width: 0; }
.goal .hbars__head .muted { white-space: nowrap; min-width: 40px; text-align: right; }
.substitute { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.substitute p { margin: 2px 0 0; }
.hero__margin { margin-top: 4px; }

/* ---------- «Таблица»: лист как в Google Таблицах */
.sheet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.tabs--soft a.is-active { background: var(--ink-900); }
.sheet-hint { margin: 0 0 0 auto; font-size: 13px; color: var(--ink-500); }
.sheet-phone { margin: 0 0 var(--space-3); font-size: 14px; color: var(--ink-500); }
.sheet-wrap { position: relative; overflow: auto; max-height: calc(100vh - 230px); background: var(--white); border: 1px solid var(--ink-150); border-radius: 16px; }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.sheet th, table.sheet td { border-right: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); padding: 0 6px; height: 30px; white-space: nowrap; }
table.sheet thead th { position: sticky; top: 0; z-index: 3; background: #EEF0F7; font-weight: 700; text-align: center; height: 44px; }
table.sheet thead th small { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-500); }
table.sheet thead th.we { background: #F2B8C3; }
table.sheet thead th.now { box-shadow: inset 0 -3px 0 var(--blue-600); }
table.sheet .sk { position: sticky; z-index: 2; background: var(--white); }
table.sheet thead .sk { z-index: 4; background: #EEF0F7; text-align: left; }
table.sheet tfoot td { position: sticky; bottom: 0; z-index: 2; background: #FFE7CC; font-weight: 700; border-top: 2px solid #F0A060; }
table.sheet tfoot .sk { z-index: 3; background: #FFE7CC; }
table.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
table.sheet td.num.neg { color: var(--danger-text); font-weight: 700; }
/* закреплённые столбцы: лист учеников */
table.sheet .sk-id { left: 0; width: 44px; min-width: 44px; text-align: center; color: var(--ink-500); }
table.sheet .sk-name { left: 44px; width: 210px; min-width: 210px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
table.sheet .sk-group { left: 254px; width: 160px; min-width: 160px; white-space: normal; font-weight: 800; text-align: center; vertical-align: middle; border-right: 2px solid var(--ink-150); }
table.sheet th.sk-group small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-500); }
/* лист слотов */
table.sheet.sheet--slots .sk-group { left: 0; width: 150px; min-width: 150px; }
table.sheet.sheet--slots .sk-min { left: 150px; width: 46px; min-width: 46px; }
table.sheet.sheet--slots .sk-pay { left: 196px; width: 64px; min-width: 64px; }
table.sheet.sheet--slots .sk-day { left: 260px; width: 40px; min-width: 40px; text-align: center; }
table.sheet.sheet--slots .sk-time { left: 300px; width: 54px; min-width: 54px; border-right: 2px solid var(--ink-150); }
table.sheet.sheet--slots .sk-group { border-right: 1px solid var(--ink-100); }
/* лист зарплат */
table.sheet.sheet--pay .sk-name { left: 0; }
table.sheet.sheet--pay .sk-group { left: 210px; font-weight: 500; text-align: left; font-size: 12px; color: var(--ink-500); }
/* цвет блоков групп, как заливка в таблице */
tbody.tone0 .sk { background: #F8DDE1; } tbody.tone1 .sk { background: #FCE7D6; } tbody.tone2 .sk { background: #FDF3CF; }
tbody.tone3 .sk { background: #E0F1DF; } tbody.tone4 .sk { background: #DCE8FA; } tbody.tone5 .sk { background: #EAE2FB; }
table.sheet tbody tr:last-child > * { border-bottom: 2px solid var(--ink-300); }
/* клетки */
table.sheet td.sc { min-width: 44px; text-align: center; cursor: cell; outline: none; font-weight: 700; }
table.sheet.sheet--slots td.sc { min-width: 92px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
table.sheet.sheet--pay td.sc { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.sheet td.sc.we { background: #F9D3DA; }
table.sheet td.sc.v1 { background: #D9F2E1; color: var(--success-text); }
table.sheet td.sc.v0 { background: #FBDDE3; color: var(--danger-text); }
table.sheet td.sc.done { background: #D9F2E1; color: var(--success-text); }
table.sheet td.sc.cancel { background: #FBDDE3; color: var(--danger-text); font-weight: 500; font-size: 12px; }
table.sheet td.sc.plan { box-shadow: inset 0 0 0 1px var(--amber-800); }
table.sheet td.sc.off { background: #F7F8FB; cursor: default; }
table.sheet td.sc.off.we { background: #F9D3DA; }
table.sheet td.sc.edited { color: var(--blue-700); text-decoration: underline dotted; }
table.sheet td.sc.is-active { box-shadow: inset 0 0 0 2px var(--blue-600); position: relative; z-index: 1; }
table.sheet td.sc.is-saving { opacity: .55; }
table.sheet[data-readonly] td.sc { cursor: default; }
.sheet-editor { position: absolute; z-index: 10; box-sizing: border-box; padding: 0 8px; border: 2px solid var(--blue-600); border-radius: 4px; font: 600 13px var(--font-sans); background: var(--white); box-shadow: 0 6px 16px rgba(14, 20, 66, .18); outline: none; }
.sheet-add { display: block; margin: 6px auto 0; padding: 3px 10px; border: 1px dashed var(--ink-300); border-radius: 999px; background: rgba(255, 255, 255, .7); font: 600 11.5px var(--font-sans); color: var(--blue-700); cursor: pointer; }
.sheet-add:hover { background: var(--white); border-style: solid; }
.sheet-pay { padding: 0; border: 0; background: none; font: inherit; color: var(--blue-700); text-decoration: underline dotted; cursor: pointer; }

/* ---------- Доступы */
.invite { border: 2px solid var(--green-100); background: linear-gradient(180deg, #F2FBF6, var(--white)); }
.invite h2 { display: flex; align-items: center; gap: 8px; color: var(--success-text); }
.invite__row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.invite__link { flex: 1 1 320px; min-width: 0; padding: 10px 12px; border: 1px solid var(--ink-150); border-radius: 12px; font: 500 13px var(--font-mono, monospace); background: var(--white); }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.invite-new { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--ink-100); }
.invite-new .field { margin: 0; min-width: 220px; }
.invite-new input, .invite-new select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ink-150); border-radius: 12px; background: var(--white); font: 500 15px var(--font-sans); }
.invite-new .field span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-700); }
/* красная 1: не был, но после пробного периода занятие оплачивается */
table.sheet td.sc.vr { background: #F7C5CE; color: #B0102F; }
table.sheet td.sc.absent { background: #F7C5CE; color: #B0102F; font-weight: 700; }
.mark.is-charged { box-shadow: inset 0 0 0 2px #E0607A; }
/* доступы: филиалы админа */
.branches summary { cursor: pointer; color: var(--blue-600, #2456D6); font-weight: 600; }
.branches__form { display: grid; gap: 6px; margin-top: 8px; min-width: 200px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; min-height: 0; }
.invite-new .branches__pick { border: 0; padding: 0; display: grid; gap: 4px; }
.invite-new .branches__pick .check input { width: 18px; min-height: 0; }
