/* Дизайн-система сайта. Перенесена из макета владельца в Figma (решение D-011).
   Имена и значения переменных повторяют коллекции Primitives и Colors в Figma:
   меняется значение там — меняется одно значение здесь. */

:root {
  /* Primitives */
  --white: #ffffff;
  --blue-50: #f2f5ff;
  --blue-100: #e2e9fe;
  --blue-200: #c8d4fe;
  --blue-500: #586eec;
  --blue-600: #4253ca;
  --blue-700: #323f9c;
  --blue-800: #253072;
  --blue-900: #1f2853;
  --blue-900-alpha-10: rgba(31, 40, 83, 0.1);
  --sand-100: #f2eeec;
  --sand-300: #cabfb8;
  --gray-400: #9b9eaa;
  --gray-600: #5a5d6a;
  --red-50: #feeeeb;
  --red-500: #ff4e46;
  --red-700: #a51f1e;
  --green-50: #e3f8eb;
  --green-500: #1fb172;
  --green-700: #006d42;
  --amber-50: #fef0d4;
  --amber-500: #f9a726;
  --amber-700: #834c03;

  /* Colors: текст */
  --color-text-primary: var(--blue-900);
  --color-text-accent: var(--blue-600);
  --color-text-secondary: var(--gray-600);
  --color-text-disabled: var(--gray-400);
  --color-text-on-accent: var(--white);

  /* Colors: фреймы */
  --color-frame-page: var(--sand-100);
  --color-frame-surface: var(--white);
  --color-frame-muted: var(--sand-300);
  --color-frame-button-primary: var(--blue-900);
  --color-frame-button-primary-hover: var(--blue-800);
  --color-frame-button-focus: var(--blue-700);
  --color-frame-button-disabled: #b5b8c7;
  --color-frame-button-secondary: var(--blue-900-alpha-10);
  --color-frame-button-secondary-hover: var(--blue-100);
  --color-frame-button-secondary-focus: var(--blue-200);

  /* Colors: фигуры и иконки */
  --color-shape-primary: var(--blue-900);
  --color-shape-accent: var(--blue-600);
  --color-shape-secondary: var(--gray-600);
  --color-shape-disabled: var(--gray-400);
  --color-shape-on-accent: var(--white);

  /* Colors: обводки */
  --color-stroke-default: var(--sand-300);
  --color-stroke-primary: var(--blue-900);

  /* Colors: статусы */
  --color-status-error-soft: var(--red-50);
  --color-status-error-base: var(--red-500);
  --color-status-error-strong: var(--red-700);
  --color-status-success-soft: var(--green-50);
  --color-status-success-base: var(--green-500);
  --color-status-success-strong: var(--green-700);
  --color-status-warning-soft: var(--amber-50);
  --color-status-warning-base: var(--amber-500);
  --color-status-warning-strong: var(--amber-700);
  --color-status-info-soft: var(--blue-50);
  --color-status-info-base: var(--blue-500);
  --color-status-info-strong: var(--blue-700);

  --radius: 10px;
  --shadow-popup: 0 14px 24px rgba(0, 0, 0, 0.1);
}

/* ---------- Основа и текстовые стили (H1, H2, txt 1–3, btn) ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--color-frame-page);
  color: var(--color-text-primary);
  font: 500 15px/1.18 'Raleway', Arial, sans-serif;
  font-feature-settings: 'lnum' 1, 'pnum' 1;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-weight: 700;
  font-size: 48px;
  line-height: normal;
  text-wrap: balance;
}

h2 {
  font-weight: 700;
  font-size: 24px;
  line-height: normal;
}

.txt-1 {
  font-size: 18px;
}

.txt-3 {
  font-size: 13px;
}

.muted {
  color: var(--color-text-secondary);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  font-feature-settings: inherit;
  color: inherit;
}

/* ---------- Иконки: файл служит маской, цвет берётся из текста ---------- */

.icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon--sm {
  width: 20px;
  height: 20px;
}

/* Иконки archive, confirm, export, journal, teachers нарисованы без макета — под меню администратора; close — крестик в выборе файла, delete — удаление файла работы, student-add — «Добавить несколько студентов», plus — кнопки «Добавить …». */
.icon--account-circle { --icon: url('../icons/account-circle.svg'); }
.icon--archive { --icon: url('../icons/archive.svg'); }
.icon--confirm { --icon: url('../icons/confirm.svg'); }
.icon--export { --icon: url('../icons/export.svg'); }
.icon--journal { --icon: url('../icons/journal.svg'); }
.icon--teachers { --icon: url('../icons/teachers.svg'); }
.icon--arrow-down { --icon: url('../icons/arrow-down.svg'); }
.icon--arrow-left { --icon: url('../icons/arrow-down.svg'); transform: rotate(90deg); }
.icon--close { --icon: url('../icons/close.svg'); }
.icon--student-add { --icon: url('../icons/student-add.svg'); }
.icon--delete { --icon: url('../icons/delete.svg'); }
.icon--done-all { --icon: url('../icons/done-all.svg'); }
.icon--plus { --icon: url('../icons/plus.svg'); }
.icon--change-request { --icon: url('../icons/change-request.svg'); }
.icon--documents { --icon: url('../icons/documents.svg'); }
.icon--download { --icon: url('../icons/download.svg'); }
.icon--edit { --icon: url('../icons/edit.svg'); }
.icon--grades { --icon: url('../icons/grades.svg'); }
.icon--info { --icon: url('../icons/info.svg'); }
.icon--logout { --icon: url('../icons/logout.svg'); }
.icon--my-work { --icon: url('../icons/my-work.svg'); }
.icon--requests { --icon: url('../icons/requests.svg'); }
.icon--rules { --icon: url('../icons/rules.svg'); }
.icon--search { --icon: url('../icons/search.svg'); }
.icon--students { --icon: url('../icons/students.svg'); }
.icon--summary-report { --icon: url('../icons/summary-report.svg'); }
.icon--topic-bank { --icon: url('../icons/topic-bank.svg'); }
.icon--upload { --icon: url('../icons/upload.svg'); }

/* ---------- Логотип: два слоя, как в компоненте logo ---------- */

.logo {
  position: relative;
  display: block;
  width: 144px;
  aspect-ratio: 144 / 44;
}

.logo img {
  position: absolute;
  display: block;
}

.logo__shadow {
  left: 18.72%;
  top: 9.09%;
  width: 62.57%;
  height: 82.2%;
}

.logo__main {
  left: 27.73%;
  top: 19.3%;
  width: 44.55%;
  height: 60.58%;
}

.logo--sm {
  width: 96.5px;
}

/* ---------- Каркас: боковое меню и область содержимого ---------- */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  flex: none;
  width: 230px;
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.sidebar__logo {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* menu point: Default / Hover / Active */
.menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px 20px 16px 32px;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.menu__item:hover,
.menu__item:focus-visible {
  color: var(--color-text-primary);
  outline: 0;
}

.menu__item.is-active {
  background: var(--color-frame-button-secondary);
  box-shadow: inset 4px 0 0 var(--color-stroke-primary);
  color: var(--color-text-primary);
}

.main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 30px 40px 60px;
  background: var(--color-frame-surface);
  border-radius: 20px 0 0 20px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 45px;
  max-width: 1130px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stack--10 {
  gap: 10px;
}

.narrow {
  max-width: 560px;
}

.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: calc(100% - 300px);
}

.page-head__sub {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--color-text-secondary);
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* Имя пользователя в правом верхнем углу и его выпадающее меню */
.user {
  position: absolute;
  top: 30px;
  right: 40px;
  z-index: 5;
}

.user__summary {
  display: flex;
  align-items: center;
  gap: 17px;
  line-height: normal;
  cursor: pointer;
  list-style: none;
}

.user__summary::-webkit-details-marker {
  display: none;
}

.user__role {
  color: var(--color-text-secondary);
}

.user__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 17px;
}

.user__summary > .icon {
  color: var(--color-shape-secondary);
}

.user__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-frame-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
}

.user__panel form {
  display: contents;
}

/* dropdown point: Default / Hover */
.user__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: var(--color-frame-surface);
  border: 0;
  border-bottom: 1px solid var(--color-stroke-default);
  color: var(--color-text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user__item:last-child,
.user__panel form:last-child .user__item {
  border-bottom: 0;
}

.user__item:hover,
.user__item:focus-visible {
  background: var(--color-frame-page);
  outline: 0;
}

.user__item--danger {
  color: var(--color-status-error-base);
}

/* ---------- Кнопки: accent btn, secondary btn, txt btn ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.18;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 0;
}

.btn:disabled {
  cursor: default;
}

.btn--accent {
  background: var(--color-frame-button-primary);
  color: var(--color-text-on-accent);
}

.btn--accent:hover {
  background: var(--color-frame-button-primary-hover);
}

.btn--accent:focus-visible {
  background: var(--color-frame-button-focus);
}

.btn--accent:disabled {
  background: var(--color-frame-button-disabled);
}

.btn--secondary {
  background: var(--color-frame-button-secondary);
  color: var(--color-text-primary);
}

.btn--secondary:hover {
  background: var(--color-frame-button-secondary-hover);
}

.btn--secondary:focus-visible {
  background: var(--color-frame-button-secondary-focus);
}

.btn--secondary:disabled {
  background: var(--color-frame-button-secondary);
  color: var(--color-text-disabled);
}

.btn--sm {
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: none;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: normal;
  color: var(--color-text-accent);
  text-decoration: underline;
  text-underline-position: from-font;
  cursor: pointer;
}

.link:hover {
  color: var(--color-text-primary);
}

.link:focus-visible {
  color: var(--color-text-secondary);
  outline: 0;
}

/* ---------- Плашка статуса: status, варианты color bg и white bg ---------- */

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  line-height: normal;
  white-space: nowrap;
}

.status--warning { background: var(--color-status-warning-soft); color: var(--color-status-warning-strong); }
.status--success { background: var(--color-status-success-soft); color: var(--color-status-success-strong); }
.status--error { background: var(--color-status-error-soft); color: var(--color-status-error-strong); }
.status--info { background: var(--color-status-info-soft); color: var(--color-status-info-strong); }

.status--white { background: var(--color-frame-surface); }
.status--white.status--warning { color: var(--color-status-warning-base); }
.status--white.status--success { color: var(--color-status-success-base); }
.status--white.status--error { color: var(--color-status-error-base); }
.status--white.status--info { color: var(--color-status-info-base); }

/* ---------- Уведомление: notification ---------- */

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid;
  border-radius: var(--radius);
}

.notice__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notice--center {
  justify-content: center;
  text-align: center;
}

.notice--info { background: var(--color-status-info-soft); border-color: var(--color-status-info-base); }
.notice--success { background: var(--color-status-success-soft); border-color: var(--color-status-success-base); }
.notice--warning { background: var(--color-status-warning-soft); border-color: var(--color-status-warning-base); }
.notice--error { background: var(--color-status-error-soft); border-color: var(--color-status-error-base); }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 452px;
  max-width: calc(100vw - 32px);
}

/* ---------- Список «подпись — значение» на странице работы ---------- */

.props {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  font-size: 18px;
}

.props__row {
  display: flex;
  align-items: center;
  gap: 50px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-stroke-default);
}

.props__row--top {
  align-items: flex-start;
}

.props__label {
  flex: none;
  width: 193px;
  color: var(--color-text-secondary);
}

.props__value {
  min-width: 0;
  margin: 0;
}

/* Пояснение под плашкой статуса */
.props__hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---------- Таблица: tabel point heder, строки, table btn ---------- */

.table-scroll {
  overflow-x: auto;
}

.table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 900px;
}

.table__head,
.table__row {
  display: grid;
  grid-template-columns: var(--cols);
}

.table__head {
  overflow: hidden;
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
  color: var(--color-text-secondary);
}

.table__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
}

/* В макете у каждой строки своя рамка, поэтому между строками линия в 2px,
   а по краям таблицы — в 1px: боковые стороны даёт рамка самой таблицы. */
.table__row {
  background: var(--color-frame-page);
  border-top: 1px solid var(--color-stroke-default);
  border-bottom: 1px solid var(--color-stroke-default);
}

.table__row:first-child {
  border-top: 0;
}

.table__row:last-child {
  border-bottom: 0;
}

.table__cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 15px 16px;
  border-right: 1px solid var(--color-stroke-default);
}

.table__cell:last-child {
  border-right: 0;
}

/* Длинное слово без пробелов — почта, имя файла — переносится внутри ячейки, а не наезжает на соседнюю.
   Заголовков столбцов это не касается: их слова не должны рваться посередине. */
.table__row .table__cell {
  overflow-wrap: anywhere;
}

.table__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.table__note {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.table__row--current {
  background: var(--color-status-info-soft);
  border-color: var(--color-status-info-base);
}

.table__row--current .table__cell {
  border-right-color: var(--color-status-info-base);
}

.table__row--empty {
  opacity: 0.5;
}

.table__cell--action {
  padding: 0;
}

/* Кнопка-действие внутри формы занимает ячейку так же, как ссылка */
.table__cell--action > form {
  display: contents;
}

.table-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  font-weight: 700;
  line-height: normal;
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-position: from-font;
  cursor: pointer;
}

.table-btn:hover {
  background: var(--color-frame-button-secondary);
}

.table-btn:focus-visible {
  background: var(--color-frame-button-secondary-focus);
  outline: 0;
}

/* ---------- Поля формы: input, dropdown, radio+checkbox ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.field__label {
  font-size: 18px;
}

.field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.field__control > .icon {
  position: absolute;
  left: 12px;
  pointer-events: none;
}

.field .field__control > .icon + input {
  padding-left: 46px;
}

.field input:not([type='radio'], [type='checkbox'], [type='file']),
.field select,
.field textarea {
  width: 100%;
  height: 48px;
  padding: 12px;
  background: var(--color-frame-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.18;
  outline: 0;
}

.field textarea {
  height: auto;
  min-height: 96px;
  resize: vertical;
}

.field ::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

.field input:not([type='radio'], [type='checkbox'], [type='file']):hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--color-stroke-primary);
}

.field input:not([type='radio'], [type='checkbox'], [type='file']):focus,
.field select:focus,
.field textarea:focus {
  background-color: var(--color-frame-page);
  border-color: var(--color-stroke-primary);
}

.field select {
  padding-right: 46px;
  background-image: url('../icons/arrow-down.svg');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 24px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Пока список раскрыт, стрелка смотрит вверх */
.field select:open {
  background-image: url('../icons/arrow-up.svg');
}

.field--error input:not([type='radio'], [type='checkbox'], [type='file']),
.field--error select,
.field--error textarea {
  border-color: var(--color-status-error-base);
}

.field__hint {
  color: var(--color-text-secondary);
}

.field__hint--sm {
  font-size: 13px;
  color: var(--color-text-disabled);
}

.field__error {
  color: var(--color-status-error-base);
}

/* ---------- Выпадающий список по макету (Figma «dropdown» 47:4152, «dropdown point» 47:4075) ---------- */
/* Скрипт прячет настоящий список и ставит на его место кнопку; значение отправляет настоящий список.
   Без скрипта остаётся обычный список браузера со стилями выше. */

.dropdown__trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 12px 46px 12px 12px;
  background: var(--color-frame-surface) url('../icons/arrow-down.svg') no-repeat right 12px center / 24px;
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.18;
  text-align: left;
  cursor: pointer;
  outline: 0;
}

.dropdown__value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Ничего не выбрано: подпись вроде «Выбор группы» — второстепенным цветом, как в макете */
.dropdown__trigger.is-placeholder {
  color: var(--color-text-secondary);
}

.dropdown__trigger:hover {
  border-color: var(--color-stroke-primary);
}

.dropdown__trigger:focus,
.dropdown__trigger[aria-expanded='true'] {
  background-color: var(--color-frame-page);
  border-color: var(--color-stroke-primary);
}

/* Пока список раскрыт, стрелка смотрит вверх */
.dropdown__trigger[aria-expanded='true'] {
  background-image: url('../icons/arrow-up.svg');
}

.dropdown__trigger:disabled {
  border-color: var(--color-stroke-default);
  color: var(--color-text-disabled);
  cursor: default;
}

.field--error .dropdown__trigger {
  border-color: var(--color-status-error-base);
}

.dropdown__popup {
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-frame-surface);
  border: 1px solid var(--color-stroke-default);
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
  color: var(--color-text-primary);
  font-size: 15px;
  line-height: 1.18;
}

.dropdown__search {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 12px;
  border-bottom: 1px solid var(--color-stroke-default);
}

.dropdown__search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.dropdown__search input::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

.dropdown__list {
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.dropdown__option,
.dropdown__group,
.dropdown__empty {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-stroke-default);
}

.dropdown__option {
  cursor: pointer;
}

.dropdown__option.is-active {
  background: var(--color-frame-page);
}

.dropdown__option[aria-disabled='true'] {
  color: var(--color-text-disabled);
  cursor: default;
}

/* Подпись группы вариантов (курсовая, НИР) и «ничего не найдено»: образца в макете нет */
.dropdown__group,
.dropdown__empty {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.dropdown__list > :last-child,
.dropdown__empty {
  border-bottom: 0;
}

/* Скрытые поиском строки: свой display у строк перебил бы атрибут hidden */
.dropdown__popup [hidden] {
  display: none;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Форма в три равные колонки: поля стоят строго друг под другом */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1000px;
}

.form-grid--choices {
  row-gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-disabled);
  cursor: pointer;
}

/* Галочка с длинным текстом и ссылкой: текст переносится, галочка стоит у первой строки */
.choice--text {
  align-items: flex-start;
  color: var(--color-text-primary);
}

.choice--text .link {
  display: inline;
  font-weight: inherit;
  font-size: inherit;
}

.choice input {
  flex: none;
  display: grid;
  place-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid var(--color-stroke-default);
  border-radius: 50%;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.choice input[type='checkbox'] {
  border-radius: 7px;
}

.choice input::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text-primary);
  transform: scale(0);
}

.choice input[type='checkbox']::before {
  border-radius: 3px;
}

.choice input:checked::before {
  transform: scale(1);
}

.choice:hover,
.choice:has(input:checked),
.choice:has(input:focus-visible) {
  color: var(--color-text-primary);
}

.choice:hover input,
.choice input:checked,
.choice input:focus-visible {
  border-color: var(--color-stroke-primary);
}

.file {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file .btn {
  flex: none;
}

/* Имя файла — не больше двух строк, остальное уходит в многоточие */
.file__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--color-text-disabled);
}

/* Крестик отменяет выбор файла */
.file__clear {
  flex: none;
  display: inline-flex;
  padding: 0;
  background: none;
  border: 0;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.file__clear:hover,
.file__clear:focus-visible {
  color: var(--color-text-primary);
  outline: 0;
}

.divider {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--color-stroke-default);
}

/* ---------- Всплывающее окно ---------- */

.dialog {
  width: 408px;
  max-width: calc(100vw - 32px);
  padding: 30px;
  background: var(--color-frame-surface);
  border: 0;
  border-radius: var(--radius);
  color: var(--color-text-primary);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dialog > form,
.dialog__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Страницы без бокового меню: вход, смена пароля, ошибки ---------- */

.auth {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
}

/* Точечный узор из макета: одна картинка в двух углах */
.auth::before,
.auth::after {
  content: '';
  position: absolute;
  width: 545px;
  height: 625px;
  background: url('../img/login-dots.png') center / 100% 100% no-repeat;
  pointer-events: none;
}

.auth::before {
  top: 10px;
  left: 10px;
  transform: rotate(180deg);
}

.auth::after {
  right: 10px;
  bottom: 10px;
}

.auth__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 408px;
  max-width: 100%;
  padding: 30px;
  background: var(--color-frame-surface);
  border-radius: var(--radius);
}

/* Широкая карточка для длинного текста: политика конфиденциальности, согласие */
.auth__card--wide {
  width: 760px;
}

.prose {
  line-height: 1.4;
}

.prose p {
  margin-bottom: 10px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.auth__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.auth__note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  color: var(--color-text-secondary);
}

/* Пустой блок из макета: картинка, заголовок, пояснение и кнопка по центру */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.empty__body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty__image {
  display: block;
  width: 242px;
  height: 242px;
  object-fit: cover;
}

.empty__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 586px;
  font-size: 18px;
  line-height: 1.18;
  color: var(--color-text-secondary);
}

.empty__text h2 {
  color: var(--color-text-primary);
}

/* ---------- Экраны без макета: собраны из тех же переменных и отступов ---------- */

/* Раскрывающийся список правил */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}

.accordion__item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-stroke-default);
}

.accordion__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.accordion__head::-webkit-details-marker {
  display: none;
}

.accordion__body {
  padding-top: 10px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.accordion__body p {
  margin-bottom: 10px;
}

.accordion__body p:last-child {
  margin-bottom: 0;
}

/* Вкладки в карточке студента: активная выглядит как активный пункт меню */
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--color-stroke-default);
}

.tabs__item {
  padding: 16px 20px;
  color: var(--color-text-secondary);
  text-decoration: none;
}

/* Подпись перед вкладками-семестрами */
.tabs__label {
  padding: 16px 15px 16px 0;
  color: var(--color-text-secondary);
}

.tabs__item:hover,
.tabs__item:focus-visible {
  color: var(--color-text-primary);
  outline: 0;
}

.tabs__item.is-active {
  background: var(--color-frame-button-secondary);
  box-shadow: inset 0 -4px 0 var(--color-stroke-primary);
  color: var(--color-text-primary);
}

/* Ссылка в ячейке таблицы, как ФИО в макете «Студенты» */
.cell-link {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-position: from-font;
}

.cell-link:hover {
  color: var(--color-text-accent);
}

.cell-muted {
  color: var(--color-text-disabled);
}

/* Счётчик в пункте меню: плашка статуса на белом */
.menu__count {
  margin-left: auto;
}

.table__cell select {
  width: 100%;
}

.table__cell .actions {
  flex-wrap: nowrap;
}
