/* =========================================================================
   «Счастливое детство» — общий стиль сайта и личных кабинетов
   Палитра: лаванда + пастельные карточки, мягкие «пластилиновые» тени
   ========================================================================= */

/* Шрифт Nunito (OFL) — с нашего сервера, без Google Fonts (152-ФЗ: никаких зарубежных сервисов) */
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/nunito-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 {
  --bg-1: #e9dffa;
  --bg-2: #d4c5f2;
  --panel: #fbf8f5;
  --card: #fffdfb;
  --ink: #33285a;
  --ink-2: #5a4f7a;
  --muted: #8f87a9;
  --line: #eee7f6;

  --primary: #8a70df;
  --primary-2: #a792f1;
  --primary-d: #6c53c6;
  --primary-soft: #eee8fc;

  --purple: #e9e1fb;  --purple-a: #9178e3;
  --pink: #fbdfe0;    --pink-a: #ef7f8e;
  --yellow: #fcecc9;  --yellow-a: #f2b33d;
  --blue: #dde6f8;    --blue-a: #6f98e6;
  --green: #e1efd9;   --green-a: #83bf6e;
  --orange-a: #f4a25c;

  --success: #3fa465;
  --danger: #e25d6b;

  --r-lg: 32px;
  --r: 24px;
  --r-sm: 16px;

  --shadow: 0 14px 34px -14px rgba(96, 72, 176, .32), 0 3px 8px rgba(96, 72, 176, .07);
  --shadow-soft: 0 8px 20px -10px rgba(96, 72, 176, .28);
  --clay: inset 0 -5px 0 rgba(96, 72, 176, .06), inset 0 3px 0 rgba(255, 255, 255, .95);
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
  background-color: var(--bg-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-d); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 800; color: var(--ink); }
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.pre { white-space: pre-line; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px/1.2 var(--font); color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  box-shadow: 0 10px 20px -8px rgba(108, 83, 198, .7), inset 0 2px 0 rgba(255,255,255,.35),
              inset 0 -3px 0 rgba(60, 30, 140, .15);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn-light { color: var(--primary-d); background: #fff;
  box-shadow: var(--shadow-soft), inset 0 -3px 0 rgba(96, 72, 176, .08); }
.btn-light:hover { color: var(--primary-d); }
.btn-pink { background: linear-gradient(180deg, #f7a1ad, var(--pink-a));
  box-shadow: 0 10px 20px -8px rgba(239, 127, 142, .8), inset 0 2px 0 rgba(255,255,255,.35); }
.btn-green { background: linear-gradient(180deg, #9fd38c, var(--green-a));
  box-shadow: 0 10px 20px -8px rgba(110, 175, 90, .8), inset 0 2px 0 rgba(255,255,255,.35); }
.btn-soft { color: var(--primary-d); background: var(--primary-soft); box-shadow: none; }
.btn-soft:hover { color: var(--primary-d); background: #e4dafb; }
.btn-danger-soft { color: var(--danger); background: #fde8ea; box-shadow: none; }
.btn-danger-soft:hover { color: var(--danger); background: #fbd9dd; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-round { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-d); font: inherit;
  font-weight: 700; cursor: pointer; }

/* ---------- Карточки ---------- */
.card {
  background: var(--card); border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow), var(--clay);
}
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; }
.card-title h3 { margin: 0; }
.pill-link { font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  background: #fff; color: var(--ink-2); box-shadow: 0 2px 8px rgba(96,72,176,.12); }

.tint-purple { background: linear-gradient(180deg, #efe8fd, var(--purple)); }
.tint-pink   { background: linear-gradient(180deg, #fde8e8, var(--pink)); }
.tint-yellow { background: linear-gradient(180deg, #fdf3dc, var(--yellow)); }
.tint-blue   { background: linear-gradient(180deg, #e8eefb, var(--blue)); }
.tint-green  { background: linear-gradient(180deg, #ebf5e5, var(--green)); }

.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; flex: none;
  box-shadow: 0 8px 14px -8px rgba(0,0,0,.35), inset 0 2px 0 rgba(255,255,255,.4),
              inset 0 -3px 0 rgba(0,0,0,.08);
}
.icon-tile .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.icon-tile.purple { background: linear-gradient(180deg, #ad98f3, var(--purple-a)); }
.icon-tile.pink   { background: linear-gradient(180deg, #f6a2ac, var(--pink-a)); }
.icon-tile.yellow { background: linear-gradient(180deg, #f8cf73, var(--yellow-a)); }
.icon-tile.blue   { background: linear-gradient(180deg, #98b8f1, var(--blue-a)); }
.icon-tile.green  { background: linear-gradient(180deg, #a8d897, var(--green-a)); }
.icon-tile.lg { width: 60px; height: 60px; border-radius: 18px; }
.icon-tile.lg .icon { width: 30px; height: 30px; }

.stat { padding: 20px; border-radius: var(--r); box-shadow: var(--shadow), var(--clay); }
.stat .label { margin-top: 14px; font-weight: 700; color: var(--ink-2); font-size: 14.5px; }
.stat .value { font-size: 30px; font-weight: 900; line-height: 1.15; }
.stat .hint { font-size: 13px; color: var(--muted); }
.stat .hint.up { color: var(--success); font-weight: 700; }
a.stat { display: block; color: inherit; transition: transform .15s; }
a.stat:hover { transform: translateY(-3px); color: inherit; }

/* ---------- Сетки ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.grid-side-main { grid-template-columns: 320px minmax(0, 1fr); }

/* ---------- Бейджи и чипы ---------- */
.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: linear-gradient(180deg, #f59aa6, var(--pink-a)); color: #fff;
  font-size: 12px; font-weight: 800; box-shadow: 0 3px 8px -2px rgba(239,127,142,.8);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; background: var(--primary-soft); color: var(--primary-d);
}
.chip.purple { background: var(--purple); color: #6f55cb; }
.chip.pink   { background: var(--pink);   color: #cf5a6b; }
.chip.yellow { background: var(--yellow); color: #b5801a; }
.chip.blue   { background: var(--blue);   color: #4c77c8; }
.chip.green  { background: var(--green);  color: #4f8f3b; }
.chip.gray   { background: #efedf3; color: var(--muted); }
.chip.new    { background: linear-gradient(180deg, #f59aa6, var(--pink-a)); color: #fff; }

/* ---------- Аватары ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  box-shadow: 0 4px 10px -4px rgba(96,72,176,.6);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 96px; height: 96px; font-size: 30px; }
.avatar.xl { width: 128px; height: 128px; font-size: 40px; border: 5px solid #fff; }
.avatar.pink   { background: linear-gradient(180deg, #f6a2ac, var(--pink-a)); }
.avatar.yellow { background: linear-gradient(180deg, #f8cf73, var(--yellow-a)); }
.avatar.blue   { background: linear-gradient(180deg, #98b8f1, var(--blue-a)); }
.avatar.green  { background: linear-gradient(180deg, #a8d897, var(--green-a)); }
.avatar.square { border-radius: 16px; }

/* ---------- Формы ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="password"], .field input[type="date"], .field input[type="search"],
.field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; font: 600 15px/1.4 var(--font); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(138, 112, 223, .15);
}
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2);
  cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.file-drop {
  display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px;
  border: 2px dashed #d8cdf3; background: #fcfaff;
}
.file-drop input[type="file"] { font: 600 13px var(--font); color: var(--muted); max-width: 100%; }
.file-drop input[type="file"]::file-selector-button {
  border: 0; border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer;
  background: var(--primary-soft); color: var(--primary-d); font: 700 13px var(--font);
}

.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { cursor: pointer; font-size: 28px; color: #e2dcef; transition: color .1s; line-height: 1; }
.rating-input input:checked ~ label,
.rating-input label:hover, .rating-input label:hover ~ label { color: var(--yellow-a); }
.stars { color: var(--yellow-a); letter-spacing: 2px; }
.stars .off { color: #e2dcef; }

/* ---------- Уведомления ---------- */
.flashes { position: fixed; top: 18px; right: 18px; z-index: 100; display: grid; gap: 10px;
  max-width: min(420px, calc(100vw - 36px)); }
.flash {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: 18px;
  background: #fff; box-shadow: var(--shadow); font-weight: 700; font-size: 14.5px;
  animation: flash-in .3s ease; border-left: 6px solid var(--primary);
}
.flash.success { border-color: var(--green-a); }
.flash.error { border-color: var(--pink-a); }
.flash button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 18px; line-height: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* =========================================================================
   Личный кабинет (родитель и администратор)
   ========================================================================= */
.app {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px;
  max-width: 1440px; margin: 0 auto; padding: 26px; min-height: 100vh;
}

.sidebar {
  position: sticky; top: 26px; align-self: start; height: calc(100vh - 52px);
  display: flex; flex-direction: column; padding: 26px 18px 20px;
  border-radius: var(--r-lg); color: #fff; overflow-y: auto;
  background: linear-gradient(180deg, #a58ff0 0%, #8e76e2 60%, #8570dd 100%);
  box-shadow: 0 24px 50px -20px rgba(92, 64, 190, .6), inset 0 3px 0 rgba(255,255,255,.25),
              inset 0 -6px 0 rgba(60, 30, 140, .12);
}
.sidebar-profile { text-align: center; margin-bottom: 22px; }
.sidebar-profile .avatar { margin: 0 auto 12px; width: 104px; height: 104px; font-size: 34px;
  border: 5px solid rgba(255,255,255,.9); box-shadow: 0 10px 24px -8px rgba(50, 20, 120, .5);
  background: linear-gradient(180deg, #f7c9d0, #ef9fac); }
.sidebar-profile .hello { font-size: 20px; font-weight: 800; }
.sidebar-profile .role { font-size: 13px; opacity: .85; }

.nav { display: grid; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px;
  color: #fff; font-weight: 700; font-size: 15.5px; transition: background .15s;
}
.nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav a.active {
  background: var(--panel); color: var(--primary-d);
  box-shadow: 0 10px 20px -10px rgba(40, 10, 110, .55), inset 0 -3px 0 rgba(96,72,176,.08);
}
.nav a .badge { margin-left: auto; }
.nav-sep { height: 1px; background: rgba(255,255,255,.2); margin: 10px 8px; }

.side-promo {
  margin-top: auto; padding: 20px 16px; border-radius: 24px; text-align: center; color: var(--ink);
  background: linear-gradient(180deg, #fde6e6, #f9d2d6);
  box-shadow: 0 14px 26px -14px rgba(60, 20, 100, .5), var(--clay);
}
.side-promo img { width: 64px; height: 64px; margin: 0 auto 6px; }
.side-promo h4 { margin-bottom: 4px; }
.side-promo p { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }

.main {
  background: var(--panel); border-radius: var(--r-lg); padding: 28px 30px 34px;
  box-shadow: 0 30px 60px -30px rgba(92, 64, 190, .45), inset 0 3px 0 #fff; min-width: 0;
}

.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 30px; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  background: #fff; width: min(340px, 36vw); color: var(--muted);
  box-shadow: 0 6px 16px -8px rgba(96,72,176,.35), inset 0 -2px 0 rgba(96,72,176,.05);
}
.search input { border: 0; outline: 0; background: none; font: 600 14.5px var(--font); color: var(--ink);
  width: 100%; }
.round-btn {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--primary); flex: none;
  box-shadow: 0 6px 16px -8px rgba(96,72,176,.45), inset 0 -3px 0 rgba(96,72,176,.07);
}
.round-btn .badge { position: absolute; top: -4px; right: -4px; }
.round-btn.filled { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #fff; }
.burger { display: none; }

/* Приветственный баннер */
.hero-banner {
  position: relative; display: flex; align-items: center; gap: 26px; min-height: 190px;
  padding: 20px 34px 20px 20px; margin-bottom: 26px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, #ddd0fa 0%, #c9b8f3 100%);
  box-shadow: var(--shadow), inset 0 3px 0 rgba(255,255,255,.7), inset 0 -8px 0 rgba(120, 90, 210, .12);
}
.hero-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: linear-gradient(180deg, #c3b0f1, #b7a2ec);
}
.hero-banner .art { width: 240px; flex: none; align-self: flex-end; margin-bottom: -20px;
  position: relative; z-index: 1; }
.hero-banner .text { flex: 1; position: relative; z-index: 1; }
.hero-banner h2 { font-size: 27px; margin-bottom: 6px; }
.hero-banner p { color: var(--ink-2); font-weight: 600; margin-bottom: 18px; }
.hero-banner .plant { width: 110px; flex: none; align-self: flex-end; position: relative; z-index: 1;
  margin-bottom: 4px; }

/* Нижний баннер */
.bottom-banner {
  display: flex; align-items: center; gap: 22px; padding: 16px 26px 16px 18px; border-radius: 26px;
  color: #fff; margin-top: 26px;
  background: linear-gradient(180deg, #ae9af3, #8f77e3);
  box-shadow: 0 18px 34px -16px rgba(92,64,190,.7), inset 0 3px 0 rgba(255,255,255,.3),
              inset 0 -5px 0 rgba(60,30,140,.15);
}
.bottom-banner img { width: 84px; flex: none; margin: -30px 0 -10px; filter: drop-shadow(0 8px 10px rgba(60,30,120,.3)); }
.bottom-banner h3 { color: #fff; margin: 0; font-size: 21px; }
.bottom-banner p { margin: 0; opacity: .92; font-size: 14.5px; }
.bottom-banner .btn-light { margin-left: auto; }

/* Списки */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 2px solid var(--line); color: inherit;
}
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
a.list-item:hover { color: inherit; }
a.list-item:hover .play { transform: scale(1.08); }
.list-item .title { font-weight: 800; }
.list-item .sub { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.thumb { width: 52px; height: 52px; border-radius: 14px; flex: none; object-fit: cover; }
.play {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: #fff; color: var(--primary); transition: transform .15s;
  box-shadow: 0 5px 14px -6px rgba(96,72,176,.5), inset 0 -2px 0 rgba(96,72,176,.08);
}
.list-item.unread { background: linear-gradient(90deg, #fff4dc, transparent); border-radius: 14px;
  padding-left: 10px; padding-right: 10px; }

.empty {
  text-align: center; padding: 30px 16px; color: var(--muted);
}
.empty img { width: 110px; margin: 0 auto 12px; opacity: .95; }
.empty .title { font-weight: 800; color: var(--ink-2); margin-bottom: 4px; }

/* Карточка ребёнка */
.child-card { display: flex; gap: 16px; align-items: center; color: inherit; transition: transform .15s; }
a.child-card:hover { transform: translateY(-3px); color: inherit; }
.child-card .avatar { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }
.child-card h3 { margin: 0 0 2px; }

.photo-frame {
  width: 100%; aspect-ratio: 1; border-radius: 26px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, #efe8fd, #dfd3fb); font-size: 54px; font-weight: 900; color: #fff;
  box-shadow: var(--shadow), inset 0 3px 0 #fff;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame.pink   { background: linear-gradient(180deg, #fbd6da, #f3a9b3); }
.photo-frame.purple { background: linear-gradient(180deg, #d8ccfa, #ab96f0); }

.info-block { padding: 16px 18px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.info-block h4 { display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 700; }

/* Успехи (лента) */
.timeline { display: grid; gap: 14px; }
.ach {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 20px;
  background: #fff; border: 2px solid var(--line);
}
.ach .title { font-weight: 800; }
.ach .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; margin: 2px 0 6px; }
.ach p { margin: 0; color: var(--ink-2); font-size: 14.5px; white-space: pre-line; }

/* График (столбики) */
.bars { display: flex; align-items: flex-end; gap: 18px; height: 190px; padding: 0 6px;
  border-bottom: 2px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%;
  justify-content: flex-end; min-width: 0; }
.bar {
  width: 100%; max-width: 42px; border-radius: 14px 14px 10px 10px; min-height: 8px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(0,0,0,.06);
}
.bar.purple { background: linear-gradient(180deg, #c3b2f6, var(--purple-a)); }
.bar.pink   { background: linear-gradient(180deg, #f8bcc4, var(--pink-a)); }
.bar.yellow { background: linear-gradient(180deg, #fbdc98, var(--yellow-a)); }
.bar.blue   { background: linear-gradient(180deg, #b7cdf6, var(--blue-a)); }
.bar.green  { background: linear-gradient(180deg, #c3e6b5, var(--green-a)); }
.bar-val { font-weight: 800; font-size: 14px; }
.bar-labels { display: flex; gap: 18px; padding: 8px 6px 0; }
.bar-labels span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Переписка */
.chat { position: relative; display: grid; gap: 14px; max-height: 60vh; overflow-y: auto; padding: 4px 6px 4px 2px; }
.msg { max-width: 78%; display: grid; gap: 4px; }
.msg .bubble {
  padding: 14px 18px; border-radius: 22px; background: #fff; border: 2px solid var(--line);
  white-space: pre-line; overflow-wrap: anywhere;
}
.msg .subject { font-weight: 800; margin-bottom: 4px; display: block; }
.msg .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center;
  padding: 0 8px; flex-wrap: wrap; }
.msg.mine { justify-self: end; }
.msg.mine .bubble { background: linear-gradient(180deg, #a996f2, var(--primary)); color: #fff; border: 0;
  border-bottom-right-radius: 8px; box-shadow: 0 10px 20px -12px rgba(108,83,198,.8); }
.msg.mine .meta { justify-content: flex-end; }
.msg.theirs .bubble { border-bottom-left-radius: 8px; }
.msg.broadcast .bubble { background: linear-gradient(180deg, #fff8e6, #fdefcc); border-color: #f7e0a8; }
.msg.unread .bubble { border-color: var(--pink-a); background: linear-gradient(180deg, #fff1f2, #fde3e6);
  box-shadow: 0 0 0 5px rgba(239,127,142,.15); }
.day-sep { text-align: center; font-size: 12.5px; font-weight: 800; color: var(--muted); }

.thread-item .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink-a); flex: none; }

/* Таблица-список родителей */
.table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 800; padding: 0 14px; }
.table td { background: #fff; padding: 12px 14px; vertical-align: middle; }
.table td:first-child { border-radius: 16px 0 0 16px; }
.table td:last-child { border-radius: 0 16px 16px 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #faf7ff; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; background: #fff;
  color: var(--ink-2); box-shadow: 0 3px 10px -4px rgba(96,72,176,.3);
}
.tab.active { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #fff; }
.tab:hover { color: var(--primary-d); }
.tab.active:hover { color: #fff; }

.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group-head h3 { margin: 0; }

.kid-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff;
  border: 2px solid var(--line); color: inherit; transition: transform .15s, border-color .15s;
}
.kid-tile:hover { transform: translateY(-2px); border-color: #d9cdf8; color: inherit; }
.kid-tile .name { font-weight: 800; }

.review-admin.pending { border: 2px solid #f7e0a8; }
.reply-box { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--primary-soft); }
.reply-box .who { font-weight: 800; color: var(--primary-d); display: flex; gap: 8px; align-items: center;
  font-size: 14px; }

/* Авторизация */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: min(520px, 100%); padding: 34px; }
.auth-card.wide { width: min(720px, 100%); }
.auth-card .logo { justify-content: center; margin-bottom: 18px; }

/* =========================================================================
   Главная страница
   ========================================================================= */
.site { max-width: 1240px; margin: 0 auto; padding: 20px 20px 0; }

.site-header {
  position: sticky; top: 14px; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 18px; border-radius: 999px; background: rgba(255, 253, 251, .92);
  backdrop-filter: blur(10px); box-shadow: var(--shadow), var(--clay);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo img { width: 46px; height: 46px; }
.logo .name { font-weight: 900; font-size: 19px; line-height: 1.05; }
.logo .name small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.site-nav { display: flex; gap: 2px; margin: 0 auto; }
.site-nav a { padding: 8px 7px; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: 14px;
  white-space: nowrap; }
.site-nav a:hover { background: var(--primary-soft); color: var(--primary-d); }
.header-phone { font-weight: 800; color: var(--ink); white-space: nowrap; display: flex; gap: 6px;
  align-items: center; }
/* телефон в шапке не помещается рядом с меню и кнопкой «Личный кабинет» (шапка не шире 1200px) —
   он есть в разделе «Контакты» и в подвале */
.site-header .header-phone { display: none; }
.site-header .header-cta { flex: none; }

.section { padding: 70px 0 0; scroll-margin-top: 90px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 34px; }
.section-head h2 { font-size: 34px; }
.section-head p { color: var(--ink-2); font-weight: 600; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #fff; color: var(--primary-d); font-weight: 800; font-size: 13px; margin-bottom: 12px;
  box-shadow: 0 4px 12px -6px rgba(96,72,176,.4); }

.hero {
  position: relative; margin-top: 26px; padding: 70px 56px; border-radius: 40px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 500px); align-items: center; min-height: 560px;
  background: linear-gradient(180deg, #f4effd, #ece4fb);
  box-shadow: 0 30px 60px -30px rgba(92,64,190,.6), inset 0 4px 0 rgba(255,255,255,.7);
}
.hero-photo { position: absolute; top: 0; right: 0; width: 70%; height: 100%; object-fit: cover; object-position: right center;
  z-index: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #f2ecfd 0%, #f2ecfd 30%, rgba(242,236,253,.92) 38%,
              rgba(242,236,253,.55) 46%, rgba(242,236,253,0) 56%);
}
.hero-text { position: relative; z-index: 2; }
.hero h1 { font-size: 48px; line-height: 1.08; margin-bottom: 16px; }
.hero h1 span { color: var(--primary-d); }
.hero .lead { font-size: 18px; color: var(--ink-2); font-weight: 600; margin-bottom: 26px; max-width: 470px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@keyframes float { 50% { transform: translateY(-10px) rotate(6deg); } }

.facts { margin-top: 26px; }
@media (max-width: 640px) { .facts { margin-top: 16px; } }
.fact { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r);
  box-shadow: var(--shadow), var(--clay); }
.fact .value { font-size: 24px; font-weight: 900; line-height: 1.1; }
.fact .label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }

.feature { padding: 26px; }
.feature h3 { margin-top: 16px; }
.feature p { color: var(--ink-2); margin: 0; font-size: 15px; }

.program { display: flex; gap: 16px; align-items: flex-start; }
.program h3 { margin: 0 0 4px; font-size: 17px; }
.program p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.group-card { text-align: center; padding: 26px 18px; }
.group-card .emoji { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 24px; display: grid;
  place-items: center; font-size: 38px; background: #fff; box-shadow: var(--shadow-soft), var(--clay); }
.group-card h3 { margin-bottom: 2px; }
.group-card .age { font-weight: 800; color: var(--ink-2); margin-bottom: 10px; }
.group-card p { font-size: 14px; color: var(--ink-2); margin: 0; }

.schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.slot { display: flex; gap: 16px; align-items: center; padding: 12px 16px; border-radius: 18px; background: #fff;
  box-shadow: 0 6px 14px -10px rgba(96,72,176,.5); }
.slot .time { font-weight: 900; color: var(--primary-d); width: 108px; flex: none; }
.slot .what { font-weight: 700; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checklist li .icon { color: var(--green-a); margin-top: 2px; }

.price { display: flex; flex-direction: column; padding: 30px 26px; }
.price .amount { font-size: 34px; font-weight: 900; margin: 8px 0 2px; }
.price .per { color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.price .checklist { margin-bottom: 24px; flex: 1; }
.price.featured { background: linear-gradient(180deg, #a996f2, #8a70df); color: #fff; transform: translateY(-10px); }
.price.featured h3, .price.featured .per, .price.featured .checklist li { color: #fff; }
.price.featured .checklist .icon { color: #fff; }

.review { display: flex; flex-direction: column; gap: 12px; }
.review .body { color: var(--ink-2); white-space: pre-line; }
.review .who { display: flex; align-items: center; gap: 12px; }
.review .who b { display: block; }

.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--card); border-radius: 20px; padding: 0 22px;
  box-shadow: var(--shadow-soft), var(--clay); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 800; font-size: 16.5px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid;
  place-items: center; background: var(--primary-soft); color: var(--primary-d); font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

.enroll {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding: 40px;
  border-radius: 40px; background: linear-gradient(180deg, #ae9af3, #8f77e3); color: #fff;
  box-shadow: 0 30px 60px -30px rgba(92,64,190,.8), inset 0 4px 0 rgba(255,255,255,.3);
}
.enroll h2 { color: #fff; font-size: 34px; }
.enroll .lead { opacity: .95; font-weight: 600; }
.enroll .card { color: var(--ink); }
.enroll .star-art { width: 120px; margin-bottom: 10px; }

.contacts .item { display: flex; gap: 14px; align-items: center; }
.contacts .item b { display: block; }

.site-footer {
  margin-top: 70px; padding: 34px 40px; border-radius: 40px 40px 0 0; color: #fff;
  background: linear-gradient(180deg, #9a84ea, #8570dd);
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 30px;
}
.site-footer a { color: #fff; opacity: .9; }
.site-footer a:hover { opacity: 1; color: #fff; }
.site-footer .logo, .site-footer .logo .name { color: #fff; }
.site-footer .logo .name small { color: rgba(255,255,255,.8); }
.site-footer h4 { color: #fff; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-weight: 600; }
.site-footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.25); padding-top: 16px;
  font-size: 13.5px; opacity: .85; }

.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.error-page .code { font-size: 90px; font-weight: 900; color: var(--primary); line-height: 1; }

/* =========================================================================
   Адаптивность
   ========================================================================= */
@media (max-width: 1440px) {
  .header-phone { display: none; }
}

@media (max-width: 1240px) {
  .site-nav { position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column;
    background: var(--card); border-radius: 24px; padding: 12px; box-shadow: var(--shadow); display: none; }
  .site-header.open .site-nav { display: flex; }
  .site-header .burger { display: grid; }
  .site-header .header-cta { margin-left: auto; }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .hero { grid-template-columns: minmax(0, 420px); }
  .hero .lead { max-width: 400px; font-size: 17px; }
}

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero h1 { font-size: 42px; }
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; top: 0; width: 280px; height: 100vh; z-index: 80;
    border-radius: 0 32px 32px 0; transform: translateX(-105%); transition: transform .25s ease;
  }
  body.menu-open .sidebar { transform: none; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(40, 20, 90, .35); z-index: 70; }
  .burger { display: grid; }
  .main { padding: 20px 18px 26px; border-radius: 26px; }
  .grid-main-side, .grid-side-main, .grid-3, .split, .enroll { grid-template-columns: 1fr; }
  .search { display: none; }
  .hero-banner .plant { display: none; }

  .hero { padding: 44px 30px; min-height: 480px; }
  .hero-photo { width: 100%; }
  .hero::before { background: linear-gradient(90deg, rgba(247,242,255,.95) 0%, rgba(243,236,255,.85) 50%,
                  rgba(236,228,251,.2) 85%); }
  .site-footer { grid-template-columns: 1fr; }
  .price.featured { transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-4, .grid-5, .schedule { grid-template-columns: 1fr; }
  .grid-4.keep-2, .grid-5.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar h1 { font-size: 23px; }
  .hero-banner { flex-direction: column; align-items: flex-start; padding: 22px; gap: 10px; }
  .hero-banner .art { width: 170px; order: 2; align-self: center; margin-bottom: -20px; }
  .hero h1 { font-size: 34px; }
  .section-head h2, .enroll h2 { font-size: 27px; }
  .enroll { padding: 26px 18px; border-radius: 30px; }
  .bottom-banner { flex-wrap: wrap; }
  .bottom-banner .btn-light { margin-left: 0; }
  .msg { max-width: 92%; }
  .header-cta .btn-text { display: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { margin-bottom: 10px; background: #fff; border-radius: 16px; padding: 6px 0; }
  .table td { border-radius: 0 !important; padding: 6px 14px; }
  .card { padding: 18px; }
  .auth-card { padding: 24px 18px; }
}

/* =========================================================================
   Новости, статьи, раздел «Сведения об ОО»
   ========================================================================= */
.news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit;
  transition: transform .15s; }
.news-card:hover { transform: translateY(-4px); color: inherit; }
.news-card .cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(180deg, #e7ddfb, #cdbdf4); display: grid; place-items: center; }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .cover img.placeholder { width: 90px; height: 90px; object-fit: contain; }
.media-flag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center;
  padding: 4px 10px; border-radius: 999px; background: rgba(51, 40, 90, .75); color: #fff; font-size: 12.5px;
  font-weight: 800; }
.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-body .chip { align-self: flex-start; }
.news-body h3 { margin: 0; }
.news-body .excerpt { color: var(--ink-2); font-size: 14.5px; margin: 0; flex: 1; }
.news-body .more { font-weight: 800; color: var(--primary-d); display: inline-flex; gap: 6px; align-items: center; }

.article { padding: 32px; }
.article h1 { font-size: 32px; }
.rich { color: var(--ink-2); font-size: 16.5px; }
.rich h3 { color: var(--ink); margin: 22px 0 8px; font-size: 18px; }
.rich ul { padding-left: 22px; margin: 0 0 1em; }
.rich li { margin-bottom: 6px; }
.rich b { color: var(--ink); }
.rich p { margin-bottom: 12px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.gallery a { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single a { aspect-ratio: auto; max-height: 520px; }
.video { width: 100%; max-height: 560px; border-radius: 20px; background: #1f1838; margin-top: 16px; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(30, 20, 60, .88); display: grid;
  place-items: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 16px; }
.lightbox .round-btn { position: absolute; top: 20px; right: 20px; }

.sveden-nav { display: grid; gap: 4px; padding: 14px; align-self: start; position: sticky; top: 100px; }
.sveden-nav a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px;
  color: var(--ink-2); font-weight: 700; font-size: 14px; line-height: 1.35; }
.sveden-nav a .icon { margin-top: 1px; color: var(--primary); }
.sveden-nav a:hover { background: var(--primary-soft); color: var(--primary-d); }
.sveden-nav a.active { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #fff; }
.sveden-nav a.active .icon { color: #fff; }
.sveden-tile { color: inherit; align-items: center; transition: transform .15s; }
.sveden-tile:hover { transform: translateY(-3px); color: inherit; }
.docs { display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: #fff;
  border: 2px solid var(--line); color: inherit; }
.doc:hover { border-color: #d9cdf8; color: inherit; }
.doc b { display: block; }
.doc .icon:last-child { color: var(--primary); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: #1f1838; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item form { position: absolute; top: 8px; right: 8px; }
.media-item .kind { position: absolute; left: 8px; bottom: 8px; }

@media (max-width: 980px) {
  .sveden-nav { position: static; }
  .article { padding: 22px 18px; }
  .article h1 { font-size: 25px; }
}

.groups-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

@media (max-width: 640px) {
  .site { padding: 12px 12px 0; }
  .site-header { gap: 8px; padding: 8px 8px 8px 10px; top: 8px; }
  .site-header .logo img { width: 40px; height: 40px; }
  .site-header .logo .name { font-size: 15px; }
  .site-header .logo .name small { display: none; }
  .site-header .round-btn, .header-cta .btn { width: 42px; height: 42px; padding: 0; }
  .hero { padding: 0; min-height: 0; grid-template-columns: 1fr; border-radius: 30px; }
  .hero-photo { position: relative; width: 100%; height: 230px; object-position: 78% center; }
  .hero::before { display: none; }
  .hero-text { padding: 24px 20px 28px; background: linear-gradient(180deg, #f3edfe, #e6dcfa); }
  .fact .value { font-size: 20px; }
}

/* =========================================================================
   Панель: фильтры, выгрузка, дни рождения, учётные записи
   ========================================================================= */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 16px 18px; }
.filters .field { min-width: 170px; }
.filters .field.grow { flex: 1; min-width: 200px; }
.filters-actions { display: flex; gap: 8px; }
.export-buttons { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.mono { font-family: Consolas, "Courier New", monospace; letter-spacing: .02em; }
.pink-text { color: var(--pink-a); }
.muted-row td { opacity: .6; }

.alphabet { display: flex; flex-wrap: wrap; gap: 6px; }
.alphabet a { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; color: var(--ink-2); font-weight: 800; font-size: 14px; box-shadow: 0 3px 8px -4px rgba(96,72,176,.35); }
.alphabet a.active { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #fff; }

.kid-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0; }

.birthday-card { background: linear-gradient(180deg, #fff6fa, #fde8ee); border: 2px solid #f9d2dc; }
.bday { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px;
  background: #fff; color: inherit; border: 2px solid #f6dce4; transition: transform .15s; }
.bday:hover { transform: translateY(-2px); color: inherit; }
.bday.today { border-color: var(--pink-a); box-shadow: 0 0 0 5px rgba(239,127,142,.15); }
.bday .title { font-weight: 800; }
.bday-when { position: absolute; top: -10px; left: 14px; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 800; color: #fff; background: linear-gradient(180deg, #f59aa6, var(--pink-a)); }
.bday-emoji { font-size: 28px; }
.cake-btn { color: var(--pink-a); }

.cred-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; border-radius: 16px;
  background: var(--primary-soft); }
.cred-box > div { display: grid; gap: 2px; min-width: 0; }
.cred-box b { overflow-wrap: anywhere; }
.secret { filter: blur(5px); cursor: pointer; transition: filter .2s; user-select: none; }
.secret.shown { filter: none; user-select: text; }

.pick-list { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; padding: 2px; }
.pick-list .kid-tile { cursor: pointer; }
.pick-list .kid-tile .grow { display: grid; }
.pick-list input:checked + .grow b { color: var(--primary-d); }
.teacher-tile { align-items: flex-start; }
.add-slot { justify-content: center; border-style: dashed; color: var(--primary-d); font-weight: 800; background: rgba(255,255,255,.6); }
.tab .badge { margin-left: 6px; }

@media (max-width: 640px) {
  .filters .field, .filters .field.grow { min-width: 100%; }
  .cred-box { grid-template-columns: 1fr; }
}

/* ----- Памятки с доступами для родителей ----- */
.cred-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.cred-card { background: #fff; border: 2px dashed #cbbdf4; border-radius: 20px; padding: 16px 18px;
  break-inside: avoid; page-break-inside: avoid; }
.cred-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--primary-d);
  margin-bottom: 8px; }
.cred-name { font-weight: 900; font-size: 17px; }
.temp-password { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 22px;
  border-radius: 20px; background: linear-gradient(180deg, #fff6df, #fdecc2); border: 2px solid #f7dc98; }
.temp-password .grow { font-size: 14.5px; }

@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .no-print, .flashes, .a11y-panel, .temp-password { display: none !important; }
  .app { display: block; padding: 0; }
  .main { box-shadow: none; padding: 0; background: #fff; }
  .cred-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cred-card { border-color: #999; }
}

/* =========================================================================
   Подсветка плашек при наведении
   ========================================================================= */
.card, .stat, .fact, .kid-tile, .bday, .news-card, .cred-card, .info-block, .slot, .ach, .doc,
.faq details, .bottom-banner, .hero-banner, .table tr.clickable td {
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background-color .2s ease;
}
.card:hover, .stat:hover, .fact:hover, .kid-tile:hover, .bday:hover, .news-card:hover, .cred-card:hover,
.info-block:hover, .slot:hover, .ach:hover, .doc:hover, .faq details:hover {
  transform: translateY(-3px);
  filter: brightness(1.04) saturate(1.08);
  box-shadow: 0 20px 40px -16px rgba(108, 83, 198, .5), 0 0 0 3px rgba(167, 146, 241, .35), var(--clay);
  position: relative; z-index: 1;
}
.bottom-banner:hover, .hero-banner:hover { filter: brightness(1.05) saturate(1.08); }
.price.featured:hover { transform: translateY(-13px); }
/* карточки с полями ввода не сдвигаем — только подсвечиваем */
.card:has(input:not([type=hidden]), textarea, select):hover { transform: none; }
.table tr.clickable:hover td { background: #fff; filter: brightness(1.03);
  box-shadow: 0 -3px 0 rgba(167,146,241,.25) inset, 0 3px 0 rgba(167,146,241,.25) inset; }
@media (prefers-reduced-motion: reduce) {
  .card:hover, .stat:hover, .fact:hover, .kid-tile:hover, .bday:hover, .news-card:hover, .cred-card:hover,
  .info-block:hover, .slot:hover, .ach:hover, .doc:hover, .faq details:hover, .price.featured:hover { transform: none; }
}
@media print { .card:hover, .cred-card:hover { transform: none; filter: none; box-shadow: none; } }

/* ----- Редактор главной страницы ----- */
.home-editor { display: grid; gap: 14px; }
.home-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; }
.home-section > summary::-webkit-details-marker { display: none; }
.home-section > summary h3 { margin: 0; }
.home-section > summary::after { content: "+"; width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid;
  place-items: center; background: var(--primary-soft); color: var(--primary-d); font-size: 20px; font-weight: 800; }
.home-section[open] > summary::after { content: "–"; }
.home-section > summary .chip { margin-left: auto; }
.item-rows { display: grid; gap: 12px; }
.item-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: #fbf9ff;
  border: 2px solid var(--line); }
.item-fields { flex: 1; min-width: 0; display: grid; gap: 10px; }
.item-tools { display: grid; gap: 6px; }
.item-tools .btn-round { width: 34px; height: 34px; font-weight: 800; }
.home-section:hover { transform: none; }
@media (max-width: 640px) {
  .item-row { flex-direction: column; }
  .item-tools { display: flex; }
}

/* =========================================================================
   Мобильная версия: ничего не должно выходить за ширину экрана
   ========================================================================= */
.grid > *, .form-row > *, .field, .item-fields { min-width: 0; }
.field select, .field input, .field textarea, select, .input { max-width: 100%; min-width: 0; }
.kv { grid-template-columns: auto minmax(0, 1fr); }
.kv dd, .list-item .title, .cred-box b, .doc b, .card h3, .info-block, .msg .bubble { overflow-wrap: anywhere; }
.file-drop { flex-wrap: wrap; min-width: 0; }
.file-drop input[type="file"] { width: 100%; min-width: 0; }
.group-head { flex-wrap: wrap; }

@media (max-width: 980px) {
  /* колонки, заданные прямо в разметке, на планшете и телефоне складываются в одну */
  .grid-main-side, .grid-side-main { grid-template-columns: minmax(0, 1fr) !important; }
  .grid-3, .split, .enroll { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-4, .grid-5, .schedule, .groups-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4.keep-2, .grid-5.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: minmax(0, 1fr) !important; }

  /* верхняя панель кабинета: кнопки в первой строке, заголовок — под ними */
  .topbar { flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
  .topbar h1 { order: 10; flex: 1 0 100%; font-size: 23px; overflow-wrap: anywhere; }
  .topbar .round-btn { width: 42px; height: 42px; }

  /* шапка сайта */
  .site-header .logo .name { font-size: 14px; }
  .site-header .logo img { width: 36px; height: 36px; }
  .site-header .round-btn, .header-cta .btn { width: 40px; height: 40px; }

  /* строки списков и плашки с кнопками переносятся, а не распирают экран */
  .list-item { flex-wrap: wrap; }
  .list-item > .grow { flex: 1 1 150px; }
  .card.row, .row-between, .row.wrap, .ach, .bday, .kid-tile { flex-wrap: wrap; }
  .ach > .grow, .kid-tile > .grow, .bday > .grow { flex: 1 1 150px; min-width: 0; }
  .export-buttons { flex-wrap: wrap; }
  .tabs { gap: 6px; }
  .tab { padding: 8px 12px; font-size: 13px; }
  .bars { gap: 8px; height: 160px; }
  .bar-labels { gap: 8px; }
  .bar-labels span { font-size: 10.5px; }
  .stat .value { font-size: 24px; }
  .stat .label, .fact .label { overflow-wrap: anywhere; }
  .fact { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .fact .value { font-size: 19px; overflow-wrap: anywhere; }
  .price.featured, .price.featured:hover { transform: none; }
  .filters .field, .filters .field.grow { flex: 1 1 100%; }
  .alphabet a { min-width: 30px; height: 30px; }
  .msg { max-width: 100%; }
  .table td { overflow-wrap: anywhere; }
  .hero-banner h2 { font-size: 22px; }
}

@media (max-width: 400px) {
  .site-header [data-a11y-on] { display: none; }   /* кнопка остаётся в подвале сайта */
  .grid-4.keep-2, .grid-5.keep-2 { grid-template-columns: minmax(0, 1fr); }
}
.form { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) {
  .card.row > .grow, .row-between > .grow { flex: 1 1 200px; min-width: 0; }
}
@media (max-width: 640px) {
  .btn { white-space: normal; text-align: center; max-width: 100%; }
}
.card h3, .list-item .title, .fact .label, .stat .label { hyphens: auto; }
.home-section > summary { flex-wrap: wrap; }
.home-section > summary h3 { flex: 1 1 170px; overflow-wrap: normal; }
.bday-emoji { margin-left: auto; }

/* ----- Фото в редакторе главной и на карточках ----- */
[hidden] { display: none !important; }
.image-box { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding: 12px; border-radius: 16px;
  background: #fff; border: 2px dashed var(--line); }
.image-box img { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; flex: none; }
.image-box .grow { flex: 1 1 200px; min-width: 0; }
.image-box input[type="file"] { width: 100%; font: 600 13px var(--font); color: var(--muted); }
.feature-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; margin-bottom: 4px;
  box-shadow: var(--shadow-soft); }
.program-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid #fff; box-shadow: var(--shadow-soft); }

/* ---------- Демо-режим: плавающая кнопка заказа и контакты разработчика ---------- */
.order-float-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: grid; justify-items: end; gap: 8px; max-width: calc(100% - 24px); }
.order-float {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font: 900 16px/1.2 var(--font); text-decoration: none; color: #fff !important;
  background: linear-gradient(135deg, var(--primary-d), var(--primary) 45%, var(--pink-a));
  box-shadow: 0 16px 30px -12px rgba(108, 83, 198, .85), 0 0 0 4px rgba(255, 255, 255, .85);
  transition: transform .15s, filter .15s;
  animation: order-pulse 2.8s ease-in-out infinite;
}
.order-float:hover { transform: translateY(-3px); filter: brightness(1.06); }
.order-float:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.order-float .icon-sm { flex: none; }
@keyframes order-pulse {
  0%, 100% { box-shadow: 0 16px 30px -12px rgba(108, 83, 198, .85), 0 0 0 4px rgba(255, 255, 255, .85); }
  50% { box-shadow: 0 16px 34px -10px rgba(108, 83, 198, .95), 0 0 0 9px rgba(255, 255, 255, .35); }
}
.dev-contacts { padding: 10px 16px; border-radius: 18px; background: rgba(255, 255, 255, .97); color: var(--ink);
  display: grid; gap: 2px; text-align: right; box-shadow: var(--shadow-soft); }
.dev-contacts b { font-size: 14px; font-weight: 900; color: var(--ink); }
.dev-contacts-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 14px; font-size: 14px; }
.dev-contacts-list a { color: var(--primary-d) !important; font-weight: 800; text-decoration: none; white-space: nowrap; }
.dev-contacts-list a:hover { text-decoration: underline; }
.dev-contacts-list span { color: var(--pink-a); }
@media (max-width: 640px) {
  .order-float-wrap { left: 10px; right: 10px; bottom: 10px; justify-items: stretch; gap: 6px; max-width: none; }
  .order-float { justify-content: center; padding: 13px 18px; font-size: 15px; }
  .dev-contacts { text-align: center; padding: 8px 12px; }
  .dev-contacts b { font-size: 13px; }
  .dev-contacts-list { justify-content: center; font-size: 13px; }
  .site-footer { padding-bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) { .order-float { animation: none; } }
@media print { .order-float-wrap { display: none; } }


/* ---------- юридические документы, согласия, cookie, демо-версия (152-ФЗ) ---------- */
@media (max-width: 1100px) { .site-footer { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .site-footer { grid-template-columns: 1fr; } }
.site-footer .footer-legal ul { font-weight: 600; font-size: 14px; }

.consent-check { font-size: 13px; line-height: 1.45; }
.consent-check a { text-decoration: underline; text-underline-offset: 2px; }

.cookie-banner {
  position: fixed; left: 22px; bottom: 22px; z-index: 90; max-width: 440px;
  background: var(--card); color: var(--ink-2); border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 14px; line-height: 1.5;
}
.cookie-banner p { margin: 0 0 12px; }
.cookie-banner a { text-decoration: underline; }
.cookie-banner__btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .cookie-banner { left: 10px; right: 10px; bottom: 10px; max-width: none; } }
@media print { .cookie-banner { display: none !important; } }

.demo-strip {
  position: relative; z-index: 70; padding: 9px 18px; text-align: center; font-size: 13.5px; line-height: 1.45;
  color: #6b4f0e; background: #fff3c4; border-bottom: 1px solid #f2dd8f;
}
.demo-note {
  font-size: 13px; line-height: 1.45; color: #6b4f0e; background: #fff3c4; border: 1px dashed #e7c66b;
  border-radius: var(--r-sm); padding: 9px 12px;
}
fieldset.demo-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
fieldset[disabled] input, fieldset[disabled] textarea, fieldset[disabled] select,
form.demo-disabled input, form.demo-disabled textarea, form.demo-disabled select { cursor: not-allowed; opacity: .75; }
fieldset[disabled] .btn, form.demo-disabled .btn, .btn[disabled] { cursor: not-allowed; opacity: .55; transform: none; filter: grayscale(.3); }

.placeholder { background: #fff3c4; color: #6b4f0e; padding: 0 4px; border-radius: 4px; }
.legal-page { max-width: 920px; margin: 0 auto; }
.legal-page h1 { font-size: 32px; margin: 6px 0 18px; }
.legal-page h2 { font-size: 20px; margin: 28px 0 10px; }
.legal-page p, .legal-page li { line-height: 1.7; color: var(--ink-2); }
.legal-page ul { padding-left: 22px; }
.legal-crumbs { font-size: 13.5px; color: var(--muted); }
.legal-alert { background: #fff3c4; border: 1px dashed #e7c66b; color: #6b4f0e; border-radius: var(--r-sm);
  padding: 10px 14px; margin-bottom: 18px; font-size: 14px; line-height: 1.5; }
.legal-table { overflow-x: auto; margin: 10px 0 18px; }
.legal-table table { border-collapse: collapse; min-width: 720px; width: 100%; font-size: 13.5px; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
.legal-table th { background: var(--primary-soft); color: var(--ink); }
.legal-nav { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legal-nav a { text-decoration: underline; }
@media (max-width: 640px) { .legal-page h1 { font-size: 25px; } }

.demo-logins { display: grid; gap: 10px; }
.demo-logins form { margin: 0; }
