/* ZemGuru modular styles 02/16. Original cascade order preserved. */
/* Окно входа на лендинге — всегда светлое и читаемое, даже если включена тёмная тема */
.login-panel .login-card,
body[data-theme="dark"] .login-panel .login-card {
  background: #fff !important;
  color: #1a2520 !important;
  border: 1px solid rgba(0, 0, 0, .06) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28) !important;
}

.login-panel .login-card :where(h2, h3, strong, b),
body[data-theme="dark"] .login-panel .login-card :where(h2, h3, strong, b) {
  color: #0f1a14 !important;
}

.login-panel .login-card :where(p, label),
body[data-theme="dark"] .login-panel .login-card :where(p, label) {
  color: #303944 !important;
}

.login-panel .login-card .field input,
body[data-theme="dark"] .login-panel .login-card .field input {
  background: #fff !important;
  color: #1a2520 !important;
  border-color: #d5e0d8 !important;
}

.login-panel .login-card .field input::placeholder,
body[data-theme="dark"] .login-panel .login-card .field input::placeholder {
  color: #8a968f !important;
}

.login-panel .login-hints,
body[data-theme="dark"] .login-panel .login-hints {
  background: #f3f8f4 !important;
  border: 1px solid #e2ece4 !important;
}

.login-panel .login-hints :where(p, .muted),
body[data-theme="dark"] .login-panel .login-hints :where(p, .muted) {
  color: #4a5c52 !important;
}

.login-panel .login-error,
body[data-theme="dark"] .login-panel .login-error {
  background: #fff1f0 !important;
  color: #9f2d1f !important;
  border: 1px solid #f5c2be !important;
}

.login-panel .btn.ghost,
body[data-theme="dark"] .login-panel .btn.ghost {
  background: #fff !important;
  color: #247338 !important;
  border-color: #c9d9ce !important;
}

.activity-page-layout .activity-group {
  margin-top: 14px;
}

.activity-event-card {
  cursor: default;
}

.menu {
  display: grid;
  gap: 7px;
}

.menu button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  padding: 10px 12px;
  background: transparent;
  color: rgba(255,255,255,.92);
  text-align: left;
  font-weight: 650;
}

.menu button.active, .menu button:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 78%, transparent), color-mix(in srgb, var(--accent) 66%, transparent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.menu .icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 6px;
  font-size: 14px;
}

.menu-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f04d4d;
  color: #fff;
  font-size: 11px;
}

.help-card {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  box-shadow: 0 16px 42px rgba(0,0,0,.16);
}

.help-card span { color: rgba(255,255,255,.82); line-height: 1.45; }

.help-card strong {
  font-size: 17px;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: 68px 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(320px, 520px) auto auto;
  justify-content: end;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}

.hamburger, .top-icon, .icon-btn, .round-btn {
  border: 0;
  background: transparent;
  color: #1f2831;
}

.hamburger {
  justify-self: start;
  margin-right: auto;
  width: 38px;
  height: 38px;
  font-size: 21px;
}

.top-search {
  position: relative;
}

.top-search span {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #151b22;
  font-size: 22px;
}

.global-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 94;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 28, 22, .18);
}

.search-result-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 10px;
  color: inherit;
  text-align: left;
}

.search-result-row:hover {
  background: #eef7ef;
}

.search-result-row span {
  position: static;
  transform: none;
  grid-row: span 2;
  width: auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.search-result-row strong,
.search-result-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-result-row small {
  color: var(--muted);
}

.top-icon {
  position: relative;
  width: 42px;
  height: 42px;
  font-size: 24px;
}

.top-icon span {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ee4b4b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.notification-popover {
  position: absolute;
  top: 58px;
  right: 96px;
  z-index: 90;
  width: min(390px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 28, 22, .18);
}

.notification-popover .section-title {
  margin-bottom: 10px;
}

.notification-popover h2 {
  margin: 0;
  font-size: 18px;
}

.mini-notice-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-notice-list button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f8f4;
  padding: 10px;
  color: inherit;
  text-align: left;
}

.mini-notice-list button.read {
  background: #fff;
  border-color: var(--line);
}

.mini-notice-list span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--soft-green);
  color: var(--green);
  font-weight: 900;
}

.mini-notice-list strong {
  min-width: 0;
  font-size: 13px;
}

.mini-notice-list small {
  color: var(--muted);
  white-space: nowrap;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 4px;
  border-radius: 8px;
}

.profile-chip:hover {
  background: #f2f6f3;
}

.profile-chip span:first-child {
  display: grid;
  gap: 2px;
  text-align: right;
}

.profile-chip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-menu {
  position: absolute;
  top: 58px;
  right: 28px;
  z-index: 92;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 28, 22, .18);
}

.profile-menu button {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 11px 12px;
  color: #202830;
  text-align: left;
  font-weight: 800;
}

.profile-menu button:hover {
  background: #eef7ef;
  color: var(--green);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #f1b88d 0 22%, transparent 23%),
    radial-gradient(circle at 50% 47%, #312118 0 21%, transparent 22%),
    linear-gradient(#d9e6dc, #b8c9bc);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d7ded9;
}

.small-avatar { width: 30px; height: 30px; }

.content {
  width: min(1600px, 100%);
  padding: 24px 32px 34px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 1px rgba(18, 27, 22, .02);
}

.panel h2, .panel h3 { margin-top: 0; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.main-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.right-rail {
  display: grid;
  gap: 14px;
}

.right-rail .panel {
  padding: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  min-height: 250px;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.kpi-card strong {
  font-size: 34px;
}

.kpi-card small {
  font-size: 17px;
}

.kpi-card span, .kpi-card p, .muted {
  color: var(--muted);
}

.status-medal {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 4px solid #d5e8d8;
  border-radius: 18px;
  color: var(--green);
  font-size: 30px;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #dfe4df;
  overflow: hidden;
}

.progress span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.mini-chart {
  height: 84px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding-top: 16px;
}

.mini-chart i {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(#2f8a42, rgba(47,138,66,.08));
}

.home-community-kpi .home-community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-community-kpi .home-community-head h3 {
  margin: 0;
}

.home-community-kpi .rail-topic:first-of-type {
  padding-top: 0;
}

.home-community-kpi .rail-topic:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.home-community-kpi .home-community-topic {
  display: grid;
  gap: 6px;
}

.home-community-kpi button.home-community-topic-open {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  padding: 0;
}

.home-community-kpi button.home-community-topic-open:hover p {
  color: var(--green);
}

.home-community-topic-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.home-community-topic-heart {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.home-community-topic-heart:hover,
.home-community-topic-heart:focus-visible {
  color: #e11d48;
}

.home-community-topic-heart.is-active {
  color: #e11d48;
}

.home-community-topic-heart:active {
  transform: scale(0.94);
}

.home-community-topic-replies {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-community-topic-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.event-hero {
  min-height: 190px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 18, 20, .92), rgba(6, 18, 20, .68)),
    var(--bg) center/cover;
  overflow: hidden;
}

.event-hero h2 {
  margin: 6px 0 14px;
  font-size: 24px;
}

.hero-label {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(47,138,66,.85);
  color: #fff;
  font-weight: 800;
}

.telemost-badge {
  width: 82px;
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  background: #fff;
  color: #e32323;
  line-height: 1;
}

.telemost-badge strong {
  display: block;
  margin-top: -2px;
  color: #e32323;
  font-size: 34px;
  font-weight: 900;
  line-height: .92;
}

.telemost-badge small {
  display: block;
  margin-top: 6px;
  color: #0f1719;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
}

.lesson-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.lesson-card {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 14px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(rgba(5, 18, 19, .15), rgba(5, 18, 19, .78)), var(--bg) center/cover;
  overflow: hidden;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(20, 36, 28, .18);
}

.lesson-card span {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.22);
}

.lesson-card strong { font-size: 17px; }
.lesson-card small { color: rgba(255,255,255,.86); }

.home-continue-learning {
  display: grid;
  gap: 16px;
}

.home-course-card-list {
  display: grid;
  gap: 18px;
}

.home-course-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(20, 36, 28, .03);
}

.home-course-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfb 0%, #fff 100%);
}

.home-course-card-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-course-card-progress {
  flex: 0 0 168px;
  width: 168px;
  max-width: 42%;
  text-align: right;
}

.home-course-card-progress-value {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.home-course-card-progress .progress {
  width: 100%;
  margin: 0;
}

.home-course-card-body {
  padding: 18px 20px;
  min-height: 132px;
}

.home-course-card-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.home-course-card-modules .lesson-card {
  min-height: 136px;
}

.home-course-card-more,
.home-course-card-empty {
  margin: 12px 0 0;
}

.home-course-card-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: #f8faf8;
}

.home-course-card-footer .btn {
  flex: 1 1 0;
  min-width: 140px;
  justify-content: center;
}

@media (max-width: 760px) {
  .home-course-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .home-course-card-progress {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .home-course-card-footer {
    flex-direction: column;
  }

  .home-course-card-footer .btn {
    width: 100%;
  }
}

body[data-theme="dark"] .home-course-card {
  background: var(--dark-card-readable) !important;
  border-color: var(--dark-readable-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025) inset;
}

body[data-theme="dark"] .home-course-card-head {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .02) 100%) !important;
  border-bottom-color: var(--dark-readable-border) !important;
}

body[data-theme="dark"] .home-course-card-title {
  color: var(--dark-readable-text) !important;
}

body[data-theme="dark"] .home-course-card-footer {
  background: rgba(255, 255, 255, .025) !important;
  border-top-color: var(--dark-readable-border) !important;
}

.lesson-card.locked {
  opacity: .72;
  cursor: not-allowed;
}

.lesson-card .module-card-status {
  font-style: normal;
  font-size: 12px;
  color: rgba(255,255,255,.88);
}

.module-detail-hero {
  min-height: 260px;
  display: grid;
  align-items: end;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6,18,20,.9), rgba(6,18,20,.48)),
    var(--bg) center/cover;
  overflow: hidden;
}

.module-detail-hero h2 {
  margin: 14px 0 8px;
  font-size: 34px;
}

.module-detail-hero p {
  max-width: 720px;
  color: rgba(255,255,255,.86);
  line-height: 1.5;
}

.module-detail-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.module-detail-stats span {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
}

.module-detail-stats b {
  display: block;
  color: #fff;
  font-size: 20px;
}

.module-task {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.module-task p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.two-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.two-panels .panel, .table-panel, .task-panel, .submit-panel, .homework-hero, .profile-form, .support-form {
  padding: 18px;
}

.compact-row, .rail-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.compact-row.action-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  background: transparent;
  color: inherit;
  text-align: left;
  border-radius: 0;
}

.rail-row.action-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  background: transparent;
  color: inherit;
  text-align: left;
}

.compact-row.action-row:hover, .rail-row.action-row:hover {
  margin-left: -10px;
  margin-right: -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 8px;
  background: #f3f8f4;
}

.compact-row:last-child, .rail-row:last-child { border-bottom: 0; }

.compact-row strong, .rail-row strong {
  display: block;
  margin-bottom: 4px;
}

.compact-row span, .rail-row small {
  color: var(--muted);
  font-size: 13px;
}

.rail-row {
  grid-template-columns: 36px 1fr;
}

.rail-row img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
}

.rail-topic {
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.rail-topic p {
  margin: 6px 0;
  line-height: 1.4;
}

.ring {
  --size: 112px;
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 70%, transparent 71%),
    conic-gradient(var(--green) calc(var(--p) * 1%), #e7ebe7 0);
}

.ring strong {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  line-height: 1;
  z-index: 1;
}

.ring span {
  position: absolute;
  left: 50%;
  top: 39%;
  transform: translate(-50%, -50%);
  width: 76%;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  z-index: 1;
}

.centered {
  text-align: center;
}

.legend {
  display: grid;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
}

.legend span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tabs, .category-pills, .course-tabs, .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tabs button, .category-pills button, .course-tabs button, .filter {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #343b43;
  padding: 8px 14px;
}

.tabs button.active, .category-pills button.active, .course-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.course-tabs span {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.32);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
}

.course-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 270px;
  gap: 24px;
  padding: 18px;
  align-items: center;
}

.course-hero img {
  height: 170px;
  width: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.course-hero h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.course-hero strong {
  display: block;
  margin: 8px 0;
  font-size: 29px;
}

.course-meta {
  display: grid;
  gap: 16px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.course-meta span {
  color: var(--muted);
  line-height: 1.45;
}

.course-meta b {
  color: var(--ink);
}

.block-title {
  margin: 4px 0 0;
  font-size: 20px;
}

.program-list {
  display: grid;
  gap: 12px;
}

.program-module {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.program-module.expanded {
  background: linear-gradient(90deg, rgba(46, 139, 66, .06), #fff 28%);
}

.module-summary, .lesson-module-head {
  display: grid;
  grid-template-columns: 42px 1fr 210px 120px 42px;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.module-num, .lesson-ring {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.lesson-ring {
  width: 54px;
  height: 54px;
  background: var(--soft-green);
  color: var(--green);
  border: 3px solid var(--green);
}

.module-summary h3, .lesson-module-head h2 {
  margin: 0 0 6px;
}

.module-summary p, .lesson-module-head p {
  margin: 0;
  color: var(--muted);
}

.module-stat {
  display: grid;
  gap: 6px;
}

.module-stat span {
  color: var(--muted);
  font-size: 13px;
}

.module-lessons {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.62);
}

.lesson-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 150px 150px;
  gap: 14px;
  align-items: center;
  padding: 13px 22px;
  border-bottom: 1px solid #edf0ed;
}

.lesson-line:last-child { border-bottom: 0; }
.lesson-line.current { background: linear-gradient(90deg, rgba(46,139,66,.09), transparent); }
.lesson-line span { color: var(--green); font-weight: 800; }
.lesson-line em { font-style: normal; color: var(--green); font-weight: 700; }
.lesson-line small { display: block; color: var(--muted); margin-top: 4px; }
.lesson-line.task { background: #fbfdfb; }

.lesson-module {
  overflow: hidden;
}

.lesson-module.open {
  border-color: rgba(36,115,56,.45);
}

.lesson-admin-filters {
  display: grid;
  grid-template-columns: 1.15fr 1.3fr .95fr 1fr minmax(220px, 1.35fr);
  gap: 10px;
  margin-bottom: 16px;
}

.admin-lessons-panel {
  overflow: hidden;
}

.admin-lesson-list {
  display: grid;
}

.admin-lesson-row {
  display: grid;
  grid-template-columns: 96px minmax(230px, 1fr) 116px 98px 138px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.admin-lesson-row:first-child {
  border-top: 0;
}

.admin-lesson-row:hover,
.admin-lesson-row.selected {
  background: linear-gradient(90deg, rgba(46,139,66,.08), transparent);
}

.admin-lesson-row.selected {
  box-shadow: inset 3px 0 0 var(--green);
}

.admin-lesson-row small,
.admin-lesson-row span {
  color: var(--muted);
}

.admin-lesson-row b,
.admin-lesson-title strong {
  color: var(--ink);
}

.admin-lesson-title {
  min-width: 0;
}

.admin-lesson-title strong,
.admin-lesson-title small {
  display: block;
  overflow-wrap: anywhere;
}

.lesson-bits {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.admin-lesson-row .lesson-bits {
  grid-column: 2 / span 2;
  grid-template-columns: repeat(3, max-content);
}

.admin-lesson-date {
  justify-self: end;
}

.admin-lesson-row .row-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.lesson-bits.vertical {
  margin-top: 10px;
}

.selected-lesson-info {
  display: grid;
  gap: 9px;
}

.selected-lesson-info > span,
.selected-lesson-info p {
  margin: 0;
  color: var(--muted);
}

.lesson-modal,
.lesson-editor-modal {
  width: min(1040px, calc(100vw - 28px));
}

.lesson-editor-tabs {
  margin: 6px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-editor-tabs .tabs {
  flex-wrap: wrap;
}

.lesson-editor-section {
  display: grid;
  gap: 14px;
}

.lesson-editor-section textarea,
.lesson-editor-modal textarea {
  min-height: 150px;
}

.lesson-content-editor {
  min-height: 220px;
}

.lesson-rich-editor-wrap {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.lesson-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.lesson-rich-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #d7e0da;
  border-radius: 6px;
  background: #fff;
  color: #2f3a34;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.lesson-rich-btn:hover {
  border-color: #9eb5a4;
  background: #f3f8f4;
}

.lesson-rich-btn.is-active {
  border-color: var(--green);
  background: #e8f5ec;
  color: var(--green);
}

.lesson-rich-area {
  min-height: 200px;
  max-height: 480px;
  padding: 12px 14px;
  overflow: auto;
  resize: vertical;
  line-height: 1.65;
  color: #243029;
  outline: none;
}

.lesson-rich-area:empty::before {
  content: attr(data-placeholder);
  color: #8a968f;
  pointer-events: none;
}

.lesson-rich-area:focus {
  box-shadow: inset 0 0 0 1px rgba(47, 111, 78, 0.18);
}

.lesson-formatted-content,
.lesson-view-content .lesson-formatted-content {
  display: grid;
  gap: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lesson-formatted-content h2,
.lesson-rich-area h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
}

.lesson-formatted-content h3,
.lesson-rich-area h3,
.lesson-block-heading {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
}

.lesson-formatted-content p,
.lesson-rich-area p {
  margin: 0;
}

.lesson-formatted-content ul,
.lesson-formatted-content ol,
.lesson-rich-area ul,
.lesson-rich-area ol {
  margin: 0;
  padding-left: 1.35rem;
}

.lesson-formatted-content li,
.lesson-rich-area li {
  margin: 0.2rem 0;
}

.lesson-formatted-content blockquote,
.lesson-rich-area blockquote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid #d4a64a;
  border-radius: 0 8px 8px 0;
  background: #fff8e8;
}

.lesson-view-panel {
  display: grid;
  gap: 18px;
}

.lesson-view-content {
  margin-top: 4px;
}

.lesson-video-card {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.lesson-video-link {
  overflow-wrap: anywhere;
}

.lesson-meta-list {
  display: grid;
  gap: 12px;
}

.lesson-meta-list span {
  display: block;
  color: #66716a;
  font-size: 13px;
}

.lesson-meta-list b {
  display: block;
  margin-top: 4px;
  color: #243029;
  font-size: 15px;
}

@media (max-width: 720px) {
  .lesson-rich-toolbar {
    gap: 6px 4px;
  }

  .lesson-rich-btn {
    min-width: 28px;
    height: 26px;
    font-size: 11px;
  }
}

.lesson-content-body {
  display: grid;
  gap: 12px;
}

.lesson-content-body p {
  margin: 0;
  line-height: 1.65;
}

.lesson-content-warning {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #f0d7a5;
  background: #fff8e8;
}

.lesson-video-cover-preview {
  display: block;
  max-width: 240px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.video-placeholder {
  display: grid;
  gap: 10px;
  min-height: 120px;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f6faf7;
  color: var(--green);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: center;
}

.lesson-preview {
  display: grid;
  gap: 12px;
  padding: 12px 0;
}

.checkbox-stack {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.checkbox-stack label,
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #303944;
  font-weight: 700;
}

.homework-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.homework-stats span {
  display: block;
  color: var(--muted);
}

.homework-stats b {
  color: var(--ink);
}

.task-panel p {
  display: flex;
  gap: 12px;
  align-items: center;
}

.task-panel p span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #cfe5d3;
  border-radius: var(--radius);
  background: #f3fbf4;
  color: #2c4732;
}

.upload-box {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed #cbd5ce;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.upload-box span {
  font-size: 42px;
  color: #9ea7a1;
}

.file-input {
  display: none;
}

.upload-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.uploaded-file {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
}

.uploaded-file span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eaf5ec;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.uploaded-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-file em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.video-upload p {
  color: var(--muted);
  line-height: 1.45;
}

.video-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.video-list article {
  display: grid;
  gap: 8px;
}

.video-list video {
  width: 100%;
  max-height: 190px;
  border-radius: 7px;
  background: #111;
}

.video-list span {
  color: var(--muted);
  font-size: 13px;
}

.call-hero {
  grid-template-columns: 1.2fr .9fr auto;
}

.mentor-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mentor-line small {
  color: rgba(255,255,255,.76);
}

.call-row {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr) 140px 112px 130px minmax(250px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.call-row:last-child { border-bottom: 0; }
.row-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-green);
  color: var(--green);
}

.call-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.call-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.call-row-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.danger-outline {
  color: #b35a00;
  border-color: #f0c98d;
  background: #fff9ef;
}

.danger-outline:hover {
  background: #fff2d9;
}

.danger-ghost {
  color: #b3261e;
  border-color: #f1c5c0;
  background: #fff7f6;
}

.danger-ghost:hover {
  background: #ffe8e5;
}

.call-note {
  margin: 0;
  color: #f7d6d6;
  font-weight: 800;
}

.call-reminder-cancelled {
  opacity: .92;
}

.call-reminder-cancelled small {
  color: #8a5a5a;
}

.call-reminder-cancelled .badge {
  margin-top: 6px;
}

.call-modal {
  width: min(860px, 100%);
  padding: 22px;
  box-shadow: 0 28px 90px rgba(7, 20, 15, .28);
}

.call-modal.small {
  width: min(640px, 100%);
}

.call-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.call-form-grid textarea {
  min-height: 110px;
}

.call-modal-actions {
  align-items: center;
}

.teacher-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.teacher-group-card {
  display: grid;
  gap: 14px;
}

.teacher-group-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-group-metrics span {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.teacher-group-metrics b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 3px;
}

.users-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.users-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.users-sidebar {
  width: 100%;
  min-width: 0;
  position: static;
  z-index: auto;
}

.user-role-tabs {
  margin-bottom: 0;
}

.user-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) minmax(260px, 1.4fr);
  gap: 10px;
  align-items: center;
}

.user-filter-grid select,
.user-filter-grid input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 9px 12px;
}

.admin-users-panel {
  overflow-x: auto;
  overflow-y: visible;
}

.admin-user-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.admin-user-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-user-row.selected {
  margin-left: -10px;
  margin-right: -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 8px;
  background: #f6fbf7;
}

.admin-user-row.all {
  grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.1fr) 110px minmax(130px, 1fr) 110px 130px minmax(200px, auto);
}

.admin-user-row.student {
  grid-template-columns: minmax(145px, 1fr) minmax(145px, 1fr) minmax(110px, .8fr) minmax(120px, .8fr) minmax(130px, .9fr) 105px minmax(130px, .9fr) 120px minmax(260px, auto);
}

.admin-user-row.teacher {
  grid-template-columns: minmax(145px, 1fr) minmax(145px, 1fr) minmax(150px, 1fr) minmax(120px, .8fr) 70px 70px 80px 100px minmax(220px, auto);
}

.admin-user-row.admin {
  grid-template-columns: minmax(160px, 1.1fr) minmax(170px, 1fr) 130px minmax(180px, 1fr) 130px 100px minmax(180px, auto);
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.user-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.user-detail-card {
  padding: 20px;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.user-detail-grid span {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
}

.user-detail-grid b {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.student-security-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.student-security-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.student-security-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.student-security-actions .btn {
  width: 100%;
  justify-content: center;
}

.access-reveal-box {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed rgba(36, 115, 56, .35);
  background: rgba(36, 115, 56, .06);
}

.access-reveal-box p {
  margin: 0 0 8px;
}

.access-reveal-box code {
  font-size: 15px;
  color: var(--ink);
}

.password-change-backdrop {
  z-index: 120;
}

.student-drawer-actions,
.admin-user-drawer .student-security-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.user-modal {
  width: min(820px, 100%);
  padding: 22px;
}

.user-modal.small {
  width: min(620px, 100%);
}

.course-modal {
  width: min(980px, 100%);
}

.course-modal-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.course-modal-list h3 {
  margin: 12px 0 2px;
}

.course-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.course-stat-grid span {
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
}

.course-stat-grid b {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.user-form-grid textarea {
  min-height: 110px;
}

.user-row, .course-admin-row, .review-row {
  display: grid;
  grid-template-columns: 42px minmax(170px, 1.2fr) 120px minmax(130px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(110px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.course-admin-row {
  grid-template-columns: minmax(260px, 1.3fr) 120px 110px minmax(180px, auto);
}

.review-row {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) 120px auto;
}

.user-row:last-child, .course-admin-row:last-child, .review-row:last-child {
  border-bottom: 0;
}

.user-row small, .course-admin-row small, .review-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.admin-actions-grid, .quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions {
  grid-template-columns: 1fr;
}

.community-layout {
  display: grid;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  overflow: visible;
}

.community-layout.no-chat {
  grid-template-columns: 56px 56px minmax(0, 1fr);
}

.community-layout.has-chat {
  grid-template-columns: 56px 56px minmax(0, 1fr);
}

.community-layout.no-chat .community-topics-expanded {
  min-height: min(72vh, 780px);
  max-height: calc(100vh - 180px);
  align-self: stretch;
}

.community-layout.no-chat .community-topics-expanded .community-discussions-head,
.community-layout.no-chat .community-topics-expanded .community-discussions-hint {
  flex-shrink: 0;
}

.community-layout.no-chat .community-topics-expanded .community-discussions-topic-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.community-discussions-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft-green);
}

.community-discussions-hint strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}

.community-discussions-hint p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.community-general-chat-sidecard {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft-green);
}

.community-general-chat-sidecard.is-active {
  border-color: rgba(45, 106, 79, 0.35);
  box-shadow: inset 3px 0 0 var(--accent);
}

.community-general-chat-sidecard strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}

.community-general-chat-sidecard p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.community-group-chat-list {
  display: grid;
  gap: 8px;
}

button.community-group-chat-row {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.community-group-chat-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.responsibility-multi-group-hint {
  font-size: 13px;
  line-height: 1.45;
}

.community-general-chat-panel .teacher-private-chat-head h2 {
  font-size: 18px;
}

.category-panel, .discussion-panel, .featured-topic {
  padding: 16px;
}

.category-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.category-row.active, .category-row:hover {
  background: var(--soft-green);
  color: var(--green);
}

.category-row b {
  color: var(--muted);
}

.pin-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 10px 0;
  color: #38433d;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 90px auto;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #edf0ed;
}

.topic-row.active {
  margin: 0 -10px;
  padding: 15px 10px;
  border-radius: 8px;
  background: #f5faf6;
}

.topic-row h3 {
  margin: 0 0 8px;
}

.topic-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.topic-row p span {
  color: var(--blue);
  font-weight: 700;
}

.topic-row-status {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.featured-topic {
  margin-top: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: 48px 18px;
  overflow: auto;
  background: rgba(9, 22, 18, .42);
}

.topic-modal {
  width: min(780px, 100%);
  max-width: 820px;
  padding: 20px 22px;
  box-shadow: 0 28px 90px rgba(7, 20, 15, .28);
}

.topic-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.topic-form-grid textarea {
  min-height: 120px;
}

.topic-modal .field.field-invalid label {
  color: #b54708;
}

.topic-modal .field.field-invalid input,
.topic-modal .field.field-invalid select,
.topic-modal .field.field-invalid textarea {
  border-color: #e08a4a;
  box-shadow: 0 0 0 1px rgba(224, 138, 74, 0.18);
}

.topic-form-error-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: #b54708;
}

.similar-topics-hint {
  padding: 10px 12px;
  border: 1px solid #e8eaee;
  border-radius: 8px;
  background: #f6f7f9;
}

.similar-topics-hint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.similar-topics-hint-head strong {
  font-size: 13px;
}

.similar-topics-hint-head .muted {
  font-size: 12px;
}

.similar-topic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 0;
}

.similar-topic-row + .similar-topic-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.similar-topic-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.similar-topic-badge {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 6px;
  line-height: 1.3;
}

.similar-topic-open {
  flex-shrink: 0;
  min-height: 0;
  padding: 4px 10px;
  font-size: 12px;
}

.topic-attach-field {
  margin-top: 2px;
}

.topic-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-attach-btn {
  min-height: 0;
  padding: 7px 12px;
  font-size: 13px;
}

.similar-topics {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dbe8de;
  border-radius: 8px;
  background: #f7fbf8;
}

.similar-topics h3 {
  margin: 0 0 6px;
}

.similar-topics > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.similar-topic-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e9e3;
}

.similar-topic-card:last-child {
  border-bottom: 0;
}

.similar-topic-card strong {
  display: block;
  margin-bottom: 4px;
}

.similar-topic-card span {
  color: var(--muted);
  font-size: 13px;
}

body[data-theme="dark"] .similar-topics-hint {
  background: #171f1c;
  border-color: #2a3a30;
}

body[data-theme="dark"] .similar-topic-row + .similar-topic-row {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .similar-topics-hint .similar-topic-badge {
  background: rgba(88, 185, 108, .24);
  color: #d7ffdf;
}

.topic-warning {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f2cc8c;
  border-radius: 8px;
  background: #fff8ed;
}

.topic-warning p {
  margin: 6px 0 12px;
  color: #6b5837;
}

.topic-modal-actions {
  margin-top: 16px;
}

.topic-detail > p {
  color: #303a34;
  line-height: 1.55;
}

.topic-link-line {
  margin: 8px 0;
  color: var(--muted);
}

.topic-answers {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.topic-answer {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topic-answer.teacher-answer {
  border-color: #a9d5b0;
  background: #effaf0;
}

.topic-answer p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.official-answer {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #a9d5b0;
  border-radius: 8px;
  background: #effaf0;
}

.plots-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.plot-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.plot-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: left;
}

.plot-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(36,115,56,.12);
}

.plot-card img {
  width: 108px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
}

.plot-card strong {
  display: block;
  margin-bottom: 6px;
}

.plot-card em {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-style: normal;
}

.pager {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pager button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.plot-detail {
  padding: 22px;
}

.plot-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.plot-head h2 {
  margin: 0;
  font-size: 25px;
}

.plot-form {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 26px;
}

.plot-fields {
  display: grid;
  gap: 0;
}

.field-line {
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
}

.field-line b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.field-line span, .field-line p {
  margin: 0;
  color: #242b31;
  line-height: 1.45;
}

.field-line.teacher p {
  padding: 12px;
  border-radius: 7px;
  background: #eaf3fd;
}

.screens {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.screens img, .screens button {
  height: 78px;
  border-radius: 7px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #fff;
}

.screens button {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.screens button span {
  display: block;
  font-size: 13px;
}

.doc-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-chips span, .doc-chips button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px 14px;
}

.doc-chips em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.plot-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.plot-bottom > div {
  padding: 15px;
  border-right: 1px solid var(--line);
}

.plot-bottom > div:last-child { border-right: 0; }
.plot-bottom ul { margin: 10px 0 0; padding: 0; list-style: none; line-height: 1.7; }
.plot-bottom li { color: #28332c; }
.reviewer { line-height: 1.35; }

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.doc-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.doc-search {
  min-width: 0;
}

.doc-status-tabs {
  justify-content: flex-end;
  margin-bottom: 0;
}

.doc-card {
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.doc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.doc-card-head > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.doc-card h3 {
  margin: 0;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.doc-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef4ef;
  color: var(--green);
  font-weight: 900;
}

.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-tags > span:not(.badge) {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: #f1f5f2;
  color: #4f5b54;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.doc-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 28px;
  text-align: center;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.profile-form .btn {
  grid-column: 1 / -1;
}

.nickname-field {
  grid-column: 1 / -1;
}

.nickname-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.nickname-prefix {
  padding: 10px 0 10px 12px;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
}

.nickname-input-wrap input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: 4px;
  flex: 1;
  min-width: 0;
}

.nickname-field small,
.profile-about-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-security-layout {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.toggle-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.toggle-row span {
  display: grid;
  gap: 4px;
}

.toggle-row small {
  color: var(--muted);
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.toggle-row.compact {
  margin: 14px 0;
}

.vk-panel {
  padding: 22px;
}

.vk-panel .section-title {
  align-items: flex-start;
}

.vk-panel h2 {
  margin-bottom: 6px;
}

.vk-panel p {
  line-height: 1.5;
}

.vk-connected, .vk-connect-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.vk-connected div, .vk-connect-flow div {
  display: grid;
  gap: 5px;
}

.vk-connected span, .vk-connect-flow span {
  color: var(--muted);
  line-height: 1.45;
}

.vk-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.vk-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #2b333a;
  font-weight: 750;
}

.vk-settings input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.progress-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.progress-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.progress-sidebar {
  width: 100%;
  min-width: 0;
  position: static;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: auto;
}

.progress-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.progress-card {
  min-height: 260px;
  padding: 24px;
  border-radius: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.progress-card h2 {
  margin: 0;
  font-size: 20px;
}

.progress-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.progress-card.overall {
  text-align: center;
}

.progress-card.overall .ring {
  margin-top: 2px;
  margin-bottom: 4px;
}

.progress-card.overall > strong {
  font-size: 17px;
}

.progress-number {
  display: grid;
  gap: 5px;
}

.progress-number strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.progress-number span {
  color: var(--muted);
  font-weight: 750;
}

.progress-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.progress-card-foot b {
  color: var(--green);
  font-size: 22px;
}

.plot-status-list {
  display: grid;
  gap: 9px;
}

.plot-status-list span {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f3f8f4;
  color: #304139;
  font-weight: 800;
}

.progress-modules {
  padding: 24px;
  border-radius: 16px;
}

.progress-module-list {
  display: grid;
  gap: 10px;
}

.progress-module-row {
  display: grid;
  grid-template-columns: 112px minmax(260px, 1fr) 160px 96px 150px 116px 140px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.progress-module-row.locked {
  background: #fafafa;
}

.module-index {
  display: inline-flex;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: #eef7ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.module-title {
  display: grid;
  gap: 4px;
}

.module-title strong {
  font-size: 16px;
}

.module-title span, .progress-module-row small {
  color: var(--muted);
  line-height: 1.35;
}

.module-progress-cell {
  display: grid;
  gap: 7px;
}

.module-progress-cell b {
  color: var(--green);
}

.progress-module-row > div {
  min-width: 0;
}

.progress-module-row > div:not(.module-title):not(.module-progress-cell):not(.module-index) {
  display: grid;
  gap: 5px;
}

.progress-module-row .btn {
  width: 100%;
  min-width: 130px;
  white-space: nowrap;
}

.progress-two-col,
.progress-two-column {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.status-panel, .achievements-panel, .activity-panel, .next-actions-panel {
  padding: 24px;
  border-radius: 16px;
}

.progress-two-col > .status-panel,
.progress-two-col > .achievements-panel,
.progress-two-column > .status-panel,
.progress-two-column > .achievements-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 1px 1px rgba(18, 27, 22, .02);
}

.status-summary {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
}

.status-summary .status-medal {
  width: 72px;
  height: 72px;
  margin: 0;
  font-size: 34px;
}

.status-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
}

.status-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.next-status {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.next-status h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.next-status span {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f8f4;
  color: #304139;
  font-weight: 800;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.achievement {
  min-height: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.achievement span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef7ef;
  color: var(--green);
  font-size: 20px;
}

.achievement.locked {
  color: #858c92;
  background: #fafafa;
}

.achievement.locked span {
  background: #eef0ef;
  color: #8b9298;
}

.activity-content {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 320px;
  gap: 20px;
  align-items: end;
}

.activity-bars {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 16px;
  border-radius: 12px;
  background: #f7faf8;
}

.activity-bars div {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 9px;
  align-items: end;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.activity-bars i {
  width: 100%;
  min-height: 18px;
  align-self: end;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #43ad54, #247338);
}

.activity-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.activity-stats span {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

.activity-stats b {
  color: var(--ink);
  font-size: 26px;
}

.next-actions-panel {
  display: grid;
  gap: 10px;
}

.next-action-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.next-action-row > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef7ef;
  color: var(--green);
  font-weight: 900;
}

.progress-rail-list {
  display: grid;
  gap: 10px;
}

.progress-rail-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
  color: var(--muted);
}

.progress-rail-list span:last-child {
  border-bottom: 0;
}

.progress-rail-list b {
  color: var(--green);
}

.security-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  background: #f4f8f4;
  color: #415047;
  font-size: 13px;
}

.teacher-profile-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
}

.teacher-avatar-large {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.teacher-avatar-large .avatar {
  width: 92px;
  height: 92px;
}

.teacher-profile-card h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.teacher-profile-card p {
  color: #46504b;
  line-height: 1.5;
}

.teacher-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.teacher-tags span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 7px;
  background: #eef7ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.teacher-tags.vertical {
  display: grid;
}

.teacher-form textarea {
  min-height: 96px;
}

.full-field {
  grid-column: 1 / -1;
}

.mentor-card {
  padding: 20px;
}

.mentor-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.mentor-profile-row strong {
  display: block;
  margin-bottom: 3px;
}

.mentor-profile-row small, .mentor-card p {
  color: var(--muted);
  line-height: 1.45;
}

.mentor-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.mentor-facts span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.mentor-facts b {
  color: #202830;
}

.groups-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.groups-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.groups-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.groups-sidebar {
  width: 100%;
  min-width: 0;
  position: static;
  z-index: auto;
}

.groups-top-panel {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.groups-top-panel h2 {
  margin: 0 0 6px;
}

.groups-top-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.group-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.group-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.group-tabs span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--muted);
  font-size: 12px;
}

.group-tabs .active span {
  background: #dff1e2;
  color: var(--green);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-groups-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  margin-bottom: 0;
}

.group-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.group-card.active {
  border-color: rgba(36,115,56,.55);
  box-shadow: 0 0 0 2px rgba(36,115,56,.1);
}

.admin-group-card.archived {
  background: #fbfbfa;
}

.group-card p {
  margin: 0;
  color: #4b5550;
  line-height: 1.45;
}

.group-meta, .group-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.group-meta span, .group-summary span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
}

.group-meta b, .group-summary b {
  color: #202830;
  font-size: 18px;
}

.admin-group-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-group-meta span {
  min-height: 64px;
}

.admin-group-meta b {
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.group-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.group-actions .btn {
  min-height: 36px;
  padding: 8px 12px;
}

.group-create, .group-detail {
  padding: 22px;
  margin-bottom: 16px;
}

.group-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.student-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.student-checks label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 750;
}

.student-checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.group-teacher-strip, .plot-mentor-note {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #dbe8de;
  border-radius: 8px;
  background: #f6fbf7;
}

.group-teacher-strip strong, .plot-mentor-note strong {
  display: block;
}

.group-teacher-strip small, .plot-mentor-note small {
  color: var(--muted);
}

.group-detail-actions {
  margin: 10px 0 18px;
}

.group-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.group-detail-grid section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.group-detail-grid section.group-card {
  --accent: #247338;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(36, 115, 56, .1);
  box-shadow: 0 14px 28px rgba(19, 42, 26, .06);
}

.group-detail-grid section.group-card::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 92%, white) 0%,
    color-mix(in srgb, var(--accent) 62%, white) 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, .32) inset;
  pointer-events: none;
}

.group-detail-grid h3 {
  margin: 0 0 10px;
}

.group-detail-grid section.group-card > h3 {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(36, 115, 56, .08);
}

.group-detail-grid .group-card .compact-row,
.group-detail-grid .group-card .compact-row.action-row {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 115, 56, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}

.group-detail-grid .group-card .compact-row:last-child,
.group-detail-grid .group-card .compact-row.action-row:last-child {
  margin-bottom: 0;
}

.group-detail-grid .group-card .compact-row,
.group-detail-grid .group-card .compact-row.action-row {
  border-bottom: 1px solid rgba(36, 115, 56, .08);
}

.group-detail-grid .group-card .compact-row.action-row:hover {
  margin-left: 0;
  margin-right: 0;
  padding-left: 14px;
  padding-right: 14px;
  transform: translateY(-1px);
  border-radius: 12px;
  background: rgba(243, 248, 244, .96);
  border-color: rgba(36, 115, 56, .18);
}

.group-detail-grid .group-card .empty-inline {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  border: 1px dashed rgba(36, 115, 56, .16);
}

.group-subtitle {
  margin-top: 16px !important;
}

.students-card {
  --accent: #247338;
  background: linear-gradient(180deg, #fcfdfd 0%, #ffffff 100%);
  border-color: #dfe7e2;
}

.homework-card {
  --accent: #d28a12;
  background: linear-gradient(180deg, #fffaf1 0%, #ffffff 100%);
  border-color: #f0e1b8;
}

.tickets-card {
  --accent: #4790c4;
  background: linear-gradient(180deg, #f5fbff 0%, #ffffff 100%);
  border-color: #d9eaf6;
}

.community-card {
  --accent: #3e9764;
  background: linear-gradient(180deg, #f6fbf7 0%, #ffffff 100%);
  border-color: #d9e8db;
}

.calls-card {
  --accent: #3d9a84;
  background: linear-gradient(180deg, #f5fbfa 0%, #ffffff 100%);
  border-color: #d6e8df;
}

.history-card {
  --accent: #9a7c4f;
  background: linear-gradient(180deg, #fbfaf7 0%, #ffffff 100%);
  border-color: #e7dfd1;
}

.group-mini-block {
  display: grid;
  gap: 10px;
}

.mini-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.mini-block-head p {
  margin: 0;
  color: var(--muted);
}

.topic-badge-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-badge-stack span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.group-modal {
  width: min(980px, 100%);
}

.compact-notice {
  padding: 10px 12px;
}

.group-student-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 16px;
}

.group-student-picker label {
  align-items: flex-start;
}

.group-student-picker small {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.support-ticket-form, .support-history, .ticket-detail {
  padding: 22px;
}

.support-form-grid {
  display: grid;
  grid-template-columns: minmax(230px, .78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.message-field {
  grid-row: span 3;
}

.message-field textarea {
  min-height: 178px;
}

.support-attach {
  align-self: end;
}

.support-toolbar {
  display: grid;
  gap: 12px;
}

.support-tabs, .support-extra-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.support-tabs button, .support-extra-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #343b43;
  padding: 8px 14px;
  font-weight: 750;
}

.support-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.ticket-list {
  display: grid;
  gap: 12px;
}

.ticket-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.ticket-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 115, 56, 0.38);
  background: #fcfefc;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ticket-card:hover .btn.secondary {
  border-color: rgba(36, 115, 56, 0.42);
  background: #eef7ef;
  color: var(--accent);
}

.ticket-card:focus-within {
  outline: none;
  border-color: rgba(36, 115, 56, 0.52);
  box-shadow: 0 0 0 3px rgba(36, 115, 56, 0.14);
}

.ticket-card .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ticket-card.active {
  border-color: rgba(36,115,56,.55);
  box-shadow: 0 0 0 2px rgba(36,115,56,.11);
}

.ticket-card.active:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08), 0 0 0 2px rgba(36, 115, 56, 0.14);
}

.ticket-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ticket-card h3 {
  margin: 0;
}

.ticket-card p {
  margin: 0 0 12px;
  color: #3a424a;
  line-height: 1.45;
}

.ticket-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.ticket-meta {
  display: grid;
  align-content: start;
  gap: 10px;
  justify-items: end;
}

.ticket-card .btn, .ticket-card button, .ticket-card select {
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.ticket-status {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.ticket-status.blue { background: #e8f1fc; color: #2169bd; }
.ticket-status.amber { background: #fff2d9; color: #dd8300; }
.ticket-status.green { background: #e9f6eb; color: #217036; }
.ticket-status.neutral { background: #eff1f0; color: #6a7178; }
.ticket-status.red { background: #fde9e9; color: #d43838; }

.ticket-badge-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.ticket-summary span {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: #28332c;
  line-height: 1.35;
}

.ticket-summary b, .ticket-summary small {
  display: block;
}

.ticket-summary b {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-summary small {
  margin-top: 4px;
  color: var(--muted);
}

.ticket-actions-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.ticket-actions-bar .field {
  margin: 0;
}

.empty-inline {
  padding: 18px;
  border: 1px dashed #cfd8d2;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.lessons-empty-state {
  padding: 32px 28px;
  text-align: center;
}

.lessons-empty-state h2 {
  margin: 0 0 12px;
}

.lessons-empty-state p {
  margin: 0 auto 20px;
  max-width: 34rem;
  line-height: 1.5;
}

.lessons-empty-state .btn {
  margin-top: 4px;
}

.lessons-module-empty {
  margin: 0;
  padding: 12px 4px 4px;
}

.message-thread {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.message-bubble {
  width: min(760px, 88%);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.message-bubble.support {
  justify-self: end;
  background: #eef8f0;
  border-color: #cfe5d3;
}

.message-bubble strong {
  display: block;
  margin-bottom: 8px;
}

.message-bubble strong span {
  color: var(--muted);
  font-size: 12px;
}

.message-bubble p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.message-bubble em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ticket-attachments {
  margin-bottom: 16px;
}

.support-stats {
  display: grid;
  gap: 9px;
}

.support-stats span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
  color: var(--muted);
}

.support-stats b {
  order: 2;
  color: var(--ink);
}

.support-guide-panel {
  padding: 16px 16px 14px;
}

.support-guide-panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.support-guide-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.support-guide-sections {
  display: grid;
  gap: 8px;
}

.support-guide-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbf8;
  overflow: hidden;
}

.support-guide-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.support-guide-summary::-webkit-details-marker {
  display: none;
}

.support-guide-summary::after {
  content: "+";
  margin-left: auto;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.support-guide-section[open] .support-guide-summary::after {
  content: "−";
}

.support-guide-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(36, 115, 56, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.support-guide-list {
  margin: 0;
  padding: 0 12px 12px 38px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.support-guide-list li {
  position: relative;
}

.support-guide-list li::marker {
  color: var(--accent);
}

.support-guide-timing {
  padding: 0 12px 12px 38px;
  font-size: 13px;
  line-height: 1.5;
}

.support-guide-timing p {
  margin: 0 0 8px;
}

.support-guide-timing p:last-child {
  margin-bottom: 0;
}

.support-guide-panel .link-inline {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.teacher-dialog-student-layout {
  display: grid;
  gap: 12px;
}

.teacher-dialog-mentor-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}

.teacher-dialog-mentor-card strong {
  display: block;
  margin-bottom: 2px;
}

.teacher-dialog-mentor-card p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

body[data-theme="dark"] .support-guide-section {
  background: #162018;
  border-color: #2a3a30;
}

body[data-theme="dark"] .support-guide-lead,
body[data-theme="dark"] .support-guide-timing .muted {
  color: #b8c5bb;
}

body[data-theme="dark"] .support-guide-list {
  color: #eaf3ec;
}

.quick-links {
  display: grid;
  gap: 10px;
}

.notification-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.notification-metrics button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  color: inherit;
  text-align: left;
}

.notification-metrics button.active {
  border-color: rgba(36,115,56,.52);
  background: linear-gradient(135deg, #f1fbf2, #fff);
  box-shadow: 0 0 0 2px rgba(36,115,56,.1);
}

.notification-metrics span {
  color: var(--muted);
  font-weight: 750;
}

.notification-metrics strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.notification-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.notification-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #343b43;
  padding: 8px 14px;
  font-weight: 750;
}

.notification-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.notification-group {
  display: grid;
  gap: 12px;
}

.notification-group h2 {
  margin: 0;
  font-size: 20px;
}

.notification-list {
  display: grid;
  gap: 12px;
}

.notification-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 210px;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.notification-card:hover {
  transform: translateY(-1px);
  border-color: rgba(36,115,56,.45);
  box-shadow: 0 14px 32px rgba(20, 36, 28, .08);
}

.notification-card.unread {
  background: linear-gradient(90deg, #f1fbf2, #fff 58%);
  border-color: #cde5d1;
}

.notification-card.important {
  box-shadow: inset 4px 0 0 rgba(243, 163, 34, .95);
}

.notice-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf5ef;
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.notice-icon.homework { background: #edf5ff; color: var(--blue); }
.notice-icon.plots { background: #eef8f0; color: var(--green); }
.notice-icon.calls { background: #fff4df; color: #ce7600; }
.notice-icon.community { background: #f1efff; color: var(--violet); }
.notice-icon.docs { background: #f4f6f7; color: #59616a; }
.notice-icon.support { background: #fff2d9; color: #c66c00; }

.notification-main {
  min-width: 0;
}

.notification-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.notification-title-row h3 {
  margin: 0;
  font-size: 18px;
}

.notification-card.read h3 {
  color: #4d555d;
}

.notification-main p {
  margin: 8px 0 12px;
  color: #3a424a;
  line-height: 1.5;
}

.notification-card.read p {
  color: var(--muted);
}

.notification-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.notification-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: #a5ada8;
}

.notice-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notice-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.notice-chip.new { background: #e8f5ea; color: var(--green); }
.notice-chip.read { background: #eff1f0; color: #6a7178; }
.notice-chip.important { background: #fff2d9; color: #d57b00; }
.notice-chip.action { background: #fde9e9; color: #d43838; }

.notification-controls {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.notification-controls .btn {
  width: 100%;
}

.icon-btn.subtle {
  width: 34px;
  height: 34px;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 20px;
}

.notice-task {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  background: transparent;
  padding: 12px 0;
  color: inherit;
  text-align: left;
}

.notice-task span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--soft-green);
  color: var(--green);
}

.notice-task strong, .notice-task small {
  grid-column: 2;
}

.notice-task strong {
  margin-bottom: -4px;
}

.notice-task small {
  color: var(--muted);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
  color: var(--muted);
}

.setting-row b {
  color: var(--green);
}

.notification-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 42px;
  text-align: center;
}

.notification-empty.compact {
  min-height: 260px;
}

.notification-empty > span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 20px;
  background: var(--soft-green);
  color: var(--green);
  font-size: 34px;
}

.notification-empty p {
  max-width: 560px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.toast-host {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 100;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 48px));
}

.toast {
  position: relative;
  right: auto;
  bottom: auto;
  top: auto;
  z-index: 100;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #123d2d;
  color: #fff;
  box-shadow: 0 12px 32px rgba(20, 36, 28, .22);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  pointer-events: auto;
  animation: toastIn .18s ease-out;
}

.stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats-mini span {
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
}

.stats-mini b {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 6px;
  background: #f2f4f3;
  color: #5f6870;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.badge.green { background: var(--accent-soft); color: var(--accent-hover); }
.badge.blue { background: #e8f1fc; color: #2169bd; }
.badge.amber { background: #fff2d9; color: #dd8300; }
.badge.red { background: #fde9e9; color: #d43838; }
.badge.violet { background: #efedff; color: #5a4ee3; }

.breadcrumbs {
  margin-bottom: 26px;
  color: var(--muted);
}

.watermark {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 30;
  pointer-events: none;
  color: rgba(16, 39, 31, .22);
  font-size: 12px;
  text-align: right;
}

.small, small { font-size: 13px; }
.slim { min-width: 360px; }

@media (max-width: 1280px) {
  .dashboard-grid, .notification-layout, .groups-layout, .groups-page-layout, .users-page-layout { grid-template-columns: 1fr; }
  .right-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-lesson-row { grid-template-columns: 96px minmax(240px, 1fr) 116px 98px 138px; }
  .course-hero, .plot-form { grid-template-columns: 1fr; }
  .course-meta { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; grid-template-columns: repeat(2, 1fr); }
  .progress-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-module-row { grid-template-columns: 90px minmax(220px, 1fr) 150px 88px; }
  .progress-module-row .btn { grid-column: span 1; }
  .activity-content { grid-template-columns: 1fr; }
  .user-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-sidebar, .groups-sidebar { order: 2; }
}

@media (max-width: 1500px) {
  .progress-page-layout {
    grid-template-columns: 1fr;
  }

  .progress-sidebar {
    order: 2;
  }
}

@media (max-width: 1100px) {
  .shell, .shell.compact-sidebar { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 278px;
    transform: translateX(-104%);
    transition: transform .2s ease;
    z-index: 60;
  }
  .shell.compact-sidebar .brand-text,
  .shell.compact-sidebar .role-switch,
  .shell.compact-sidebar .help-card {
    display: initial;
  }
  .shell.compact-sidebar .help-card {
    display: grid;
  }
  .shell.compact-sidebar .menu button {
    grid-template-columns: 28px 1fr auto;
    justify-items: stretch;
    padding: 10px 12px;
  }
  .shell.compact-sidebar .menu button span:not(.icon),
  .shell.compact-sidebar .menu-dot {
    display: initial;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { grid-template-columns: auto 1fr auto auto; padding: 0 16px; }
  .content { padding: 20px 16px; }
  .plots-layout, .two-panels, .kpi-grid, .lesson-cards, .docs-grid, .notification-metrics, .groups-grid, .admin-groups-grid, .group-detail-grid, .progress-two-col, .progress-two-column, .teacher-group-grid, .user-detail-grid, .groups-top-panel { grid-template-columns: 1fr; }
  .ticket-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticket-actions-bar { grid-template-columns: 1fr; }
  .plot-bottom { grid-template-columns: 1fr 1fr; }
  .notification-card { grid-template-columns: 46px minmax(0, 1fr); }
  .notification-controls { grid-column: 2; }
  .notification-popover { right: 16px; }
}

@media (max-width: 760px) {
  .landing header { align-items: flex-start; gap: 16px; }
  .nav-links { justify-content: flex-end; }
  .public-section { grid-template-columns: 1fr; }
  .hero { min-height: 64vh; }
  .page-head, .plot-head { display: grid; }
  .right-rail, .homework-stats, .course-meta, .module-summary, .lesson-module-head, .lesson-line, .call-row, .topic-row, .topic-form-grid, .call-form-grid, .similar-topic-card, .profile-form, .support-form-grid, .ticket-card, .notification-card, .teacher-profile-card, .group-form, .group-meta, .group-summary, .student-checks, .group-student-picker, .group-teacher-strip, .plot-mentor-note, .progress-kpi-grid, .progress-module-row, .status-summary, .activity-stats, .next-action-row, .teacher-group-metrics, .user-row, .course-admin-row, .review-row, .admin-actions-grid, .user-filter-grid, .admin-user-row.all, .admin-user-row.student, .admin-user-row.teacher, .admin-user-row.admin, .user-form-grid, .course-stat-grid, .lesson-admin-filters, .admin-lesson-row { grid-template-columns: 1fr; }
  .mini-block-head {
    display: grid;
  }
  .topic-badge-stack {
    justify-content: flex-start;
  }
  .admin-lesson-row .lesson-bits {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .admin-lesson-date {
    justify-self: start;
  }
  .admin-lesson-row .row-actions {
    grid-column: auto;
    justify-content: stretch;
  }
  .admin-lesson-row .row-actions .btn {
    width: 100%;
  }
  .group-top-actions { justify-content: stretch; }
  .group-top-actions .btn { width: 100%; }
  .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-module-row .btn, .next-action-row .btn { width: 100%; min-width: 0; }
  .ticket-summary { grid-template-columns: 1fr; }
  .vk-connected, .vk-connect-flow { display: grid; }
  .vk-settings { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .doc-toolbar { grid-template-columns: 1fr; }
  .doc-status-tabs { justify-content: flex-start; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 10px; }
  .profile-chip strong { display: none; }
  .top-search input { min-width: 0; }
  .global-search-popover { left: -48px; right: -78px; }
  .search-result-row { grid-template-columns: 1fr; }
  .search-result-row span { grid-row: auto; }
  .event-hero, .call-hero { grid-template-columns: 1fr; }
  .screens { grid-template-columns: repeat(2, 1fr); }
  .plot-bottom { grid-template-columns: 1fr; }
  .plot-bottom > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .plot-bottom > div:last-child { border-bottom: 0; }
  .plot-card { grid-template-columns: 92px 1fr; }
  .plot-card img { width: 92px; }
  .notification-title-row { display: grid; }
  .notification-controls { grid-column: auto; }
  .notification-popover { top: 60px; right: 10px; left: 10px; width: auto; }
  .profile-menu { top: 60px; right: 10px; width: 230px; }
  .mini-notice-list button { grid-template-columns: 30px 1fr; }
  .mini-notice-list small { grid-column: 2; }
  .slim { min-width: 0; }
}

