:root {
  color-scheme: dark;
  --cabinet-accent: #8f2440;
  --cabinet-accent-strong: #69172f;
  --cabinet-accent-soft: rgba(143, 36, 64, 0.2);
  --cabinet-accent-rgb: 143, 36, 64;
  --cabinet-accent-warm: #b85a6d;
  --cabinet-gold: #e9c985;
  --cabinet-gold-rgb: 233, 201, 133;
}

body.teacher-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--cabinet-accent-rgb), 0.3), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(184, 90, 109, 0.12), transparent 24%),
    linear-gradient(180deg, #171014 0%, #08080a 64%, #050506 100%);
}

.teacher-page .hidden {
  display: none !important;
}

.teacher-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.teacher-topbar,
.teacher-auth-card,
.teacher-sidebar,
.teacher-workspace,
.students-cabinet-list-card,
.student-detail-card,
.teacher-placeholder-card {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(24, 20, 27, 0.92), rgba(12, 10, 14, 0.96)),
    rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.board-library-folder {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 80% -10%, rgba(var(--cabinet-accent-rgb), 0.18), transparent 34%),
    linear-gradient(155deg, #171417, #080708 68%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.board-library-folder-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.board-library-folder-head strong,
.board-library-folder-head small,
.board-library-card strong,
.board-library-card small,
.board-library-empty strong,
.board-library-empty span {
  display: block;
}

.board-library-folder-head small,
.board-library-card small,
.board-library-empty span {
  margin-top: 4px;
  color: var(--muted);
}

.board-library-folder-icon {
  position: relative;
  width: 50px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px 13px 13px 13px;
  background: linear-gradient(145deg, #30282c, #0a090a 68%);
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.35);
}

.board-library-folder-icon::before {
  position: absolute;
  left: 4px;
  top: -7px;
  width: 22px;
  height: 10px;
  border: inherit;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #282125;
  content: "";
}

.board-library-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  padding: 18px;
}

.board-library-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.board-library-copy {
  min-width: 0;
}

.board-library-title-input {
  width: 100%;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f7f2f4;
  background: transparent;
  font: inherit;
  font-weight: 750;
}

.board-library-title-input:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.board-library-title-input:focus {
  border-color: rgba(var(--cabinet-accent-rgb), 0.7);
  outline: none;
  background: rgba(8, 7, 8, 0.8);
  box-shadow: 0 0 0 3px rgba(var(--cabinet-accent-rgb), 0.12);
}

.board-library-edit {
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #ddd3d8;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-weight: 700;
}

.board-library-edit:hover {
  color: #fff;
  background: rgba(var(--cabinet-accent-rgb), 0.15);
}

.board-library-edit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.lesson-history-browser {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at 84% -10%, rgba(var(--cabinet-accent-rgb), 0.16), transparent 32%),
    linear-gradient(155deg, rgba(24, 20, 25, 0.96), rgba(9, 8, 10, 0.98));
  box-shadow: var(--shadow);
}

.homework-dashboard-card {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% -8%, rgba(var(--cabinet-gold-rgb), 0.16), transparent 28%),
    radial-gradient(circle at 8% 0%, rgba(var(--cabinet-accent-rgb), 0.18), transparent 34%),
    linear-gradient(155deg, rgba(24, 20, 25, 0.96), rgba(9, 8, 10, 0.98));
  box-shadow: var(--shadow);
}

.homework-dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.homework-dashboard-toolbar p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: right;
}

.homework-filter-button,
.audit-filter-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.homework-filter-button.is-active,
.audit-filter-button.is-active {
  color: #fff;
  border-color: rgba(var(--cabinet-accent-rgb), 0.45);
  background: linear-gradient(135deg, var(--cabinet-accent), var(--cabinet-accent-strong));
  box-shadow: 0 12px 30px rgba(var(--cabinet-accent-rgb), 0.24);
}

.audit-dashboard-card {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% -10%, rgba(var(--cabinet-gold-rgb), 0.12), transparent 30%),
    radial-gradient(circle at 9% -8%, rgba(var(--cabinet-accent-rgb), 0.18), transparent 34%),
    linear-gradient(155deg, rgba(24, 20, 25, 0.96), rgba(9, 8, 10, 0.98));
  box-shadow: var(--shadow);
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.audit-summary-grid article {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(9, 8, 10, 0.82);
}

.audit-summary-grid span,
.audit-event-main small,
.audit-event-details span,
.audit-toolbar p,
.audit-events-empty span {
  color: var(--muted);
}

.audit-summary-grid strong {
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.audit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.audit-toolbar p {
  margin: 0;
  font-size: 0.82rem;
  text-align: right;
}

.audit-events-list {
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.055);
}

.audit-event-row {
  display: grid;
  grid-template-columns: 12px minmax(260px, 1fr) minmax(260px, 0.86fr);
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 14px 18px;
  background: rgba(10, 9, 12, 0.84);
}

.audit-event-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.audit-event-row.is-warning {
  background:
    linear-gradient(90deg, rgba(255, 86, 105, 0.11), transparent 42%),
    rgba(10, 9, 12, 0.86);
}

.audit-event-marker {
  width: 10px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.audit-event-marker.is-access,
.audit-event-marker.is-auth {
  background: #8bd9ff;
}

.audit-event-marker.is-lesson,
.audit-event-marker.is-board {
  background: var(--cabinet-gold);
}

.audit-event-marker.is-data,
.audit-event-marker.is-schedule,
.audit-event-marker.is-homework,
.audit-event-marker.is-materials {
  background: #9ee6a5;
}

.audit-event-main,
.audit-event-details {
  min-width: 0;
}

.audit-event-main strong,
.audit-event-main small,
.audit-event-details span,
.audit-events-empty strong,
.audit-events-empty span {
  display: block;
}

.audit-event-main strong {
  color: #fff;
  font-size: 0.96rem;
}

.audit-event-main small,
.audit-event-details span {
  margin-top: 5px;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-event-details {
  display: grid;
  justify-items: end;
  text-align: right;
}

.audit-event-details span:first-child {
  color: #efe7eb;
  font-weight: 800;
}

.audit-events-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  background: rgba(10, 9, 12, 0.84);
  text-align: center;
}

.audit-events-empty strong {
  color: #fff;
  font-size: 1.1rem;
}

.homework-assignments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  padding: 20px;
}

.homework-assignment-card,
.homework-assignments-empty {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(8, 7, 9, 0.72);
}

.homework-assignment-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.homework-assignment-card.is-submitted {
  border-color: rgba(var(--cabinet-gold-rgb), 0.36);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.06) inset;
}

.homework-assignment-card.is-review-active {
  border-color: rgba(var(--cabinet-accent-rgb), 0.72);
  box-shadow: 0 20px 55px rgba(var(--cabinet-accent-rgb), 0.18);
}

.homework-assignment-top,
.homework-assignment-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.homework-assignment-top strong,
.homework-assignment-top small {
  display: block;
}

.homework-assignment-top strong {
  color: #fff;
  font-size: 1.02rem;
}

.homework-assignment-top small,
.homework-assignment-meta,
.homework-assignments-empty span {
  color: var(--muted);
}

.homework-assignment-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #f8edf1;
  background: rgba(var(--cabinet-accent-rgb), 0.16);
  font-size: 0.72rem;
  font-weight: 900;
}

.homework-assignment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
}

.homework-assignment-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.homework-assignment-files {
  display: grid;
  gap: 9px;
}

.homework-assignment-files > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.homework-assignment-files b {
  min-width: 64px;
  color: #f7f2f4;
  font-size: 0.78rem;
}

.homework-assignment-file {
  max-width: 100%;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e9dee4;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.homework-assignment-file:hover {
  border-color: rgba(var(--cabinet-accent-rgb), 0.45);
  color: #fff;
}

.homework-assignment-file.is-empty {
  color: var(--muted);
}

.homework-assignment-file.is-more {
  color: var(--cabinet-gold);
}

.homework-assignment-actions {
  align-items: center;
  justify-content: flex-end;
}

.homework-assignment-actions .teacher-secondary-button,
.homework-assignment-actions .teacher-primary-button {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.82rem;
}

.homework-assignment-open {
  background: linear-gradient(135deg, #c42b4d, var(--cabinet-accent-strong));
}

.homework-assignments-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-height: 180px;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.homework-assignments-empty strong {
  color: #fff;
  font-size: 1.05rem;
}

.homework-review-panel {
  margin: 0 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(var(--cabinet-accent-rgb), 0.36);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(var(--cabinet-accent-rgb), 0.16), transparent 28%),
    linear-gradient(180deg, rgba(28, 23, 27, 0.94), rgba(8, 7, 9, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.homework-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.homework-review-head h2 {
  margin: 4px 0;
  color: #fff;
  font-size: clamp(1.18rem, 2vw, 1.7rem);
}

.homework-review-head p:not(.badge) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.homework-review-frame {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  min-height: 560px;
  border: 0;
  background: #f4f0ec;
}

.homework-review-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.homework-review-action {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.homework-review-action:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.homework-review-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.homework-review-action.is-accept {
  background: linear-gradient(135deg, #1d9f69, #0c6b45);
  box-shadow: 0 16px 34px rgba(29, 159, 105, 0.2);
}

.homework-review-action.is-lesson {
  background: linear-gradient(135deg, #30272d, #171115);
}

.homework-review-action.is-revision {
  background: linear-gradient(135deg, #c42b4d, var(--cabinet-accent-strong));
  box-shadow: 0 16px 34px rgba(var(--cabinet-accent-rgb), 0.25);
}

@media (max-width: 860px) {
  .homework-review-head,
  .homework-dashboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .homework-dashboard-toolbar p {
    text-align: left;
  }

  .homework-review-frame {
    height: 68vh;
    min-height: 460px;
  }

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

.lesson-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lesson-history-toolbar .lesson-history-search {
  width: min(390px, 100%);
  margin: 0;
}

.lesson-history-toolbar p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: right;
}

.lesson-history-matrix,
.student-lesson-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lesson-history-matrix {
  padding: 20px;
}

.student-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.student-history-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  text-align: right;
}

.student-lesson-matrix {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.lesson-preview-item {
  display: grid;
  min-width: 0;
  align-content: start;
}

.lesson-preview-lifecycle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}

.lesson-preview-lifecycle-actions button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #d9ced3;
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
}

.lesson-preview-lifecycle-actions button:hover,
.lesson-preview-lifecycle-actions button:focus-visible {
  border-color: rgba(var(--cabinet-accent-rgb), 0.42);
  color: #fff;
  background: rgba(var(--cabinet-accent-rgb), 0.16);
}

.lesson-preview-lifecycle-actions button.is-primary {
  border-color: rgba(var(--cabinet-accent-rgb), 0.48);
  color: #fff0f3;
  background: linear-gradient(135deg, #8f2039, #65162b);
}

.lesson-preview-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #f6eef2;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  font: inherit;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.lesson-preview-card:not(:disabled):hover,
.lesson-preview-card:not(:disabled):focus-visible {
  border-color: rgba(var(--cabinet-accent-rgb), 0.46);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-3px);
}

.lesson-preview-card:disabled {
  cursor: default;
  opacity: 0.62;
}

.lesson-preview-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #0e0c0e;
  background-size: 20px 20px;
}

.lesson-preview-media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eeeae7;
}

.lesson-preview-placeholder {
  display: grid;
  justify-items: center;
  color: #bcb1b6;
}

.lesson-preview-placeholder i {
  width: 40px;
  height: 29px;
  margin-bottom: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  box-shadow: 5px -5px 0 rgba(255, 255, 255, 0.07);
}

.lesson-preview-placeholder strong,
.lesson-preview-placeholder small {
  display: block;
}

.lesson-preview-placeholder strong {
  color: #ece3e7;
  font-size: 0.82rem;
}

.lesson-preview-placeholder small {
  margin-top: 2px;
  color: #8f858a;
  font-size: 0.7rem;
}

.lesson-preview-copy {
  display: grid;
  gap: 7px;
  padding: 13px 14px 14px;
}

.lesson-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lesson-preview-heading strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-preview-status {
  flex: 0 0 auto;
  color: #b9aeb3;
  font-size: 0.66rem;
  font-style: normal;
}

.lesson-preview-card.is-live .lesson-preview-status,
.lesson-preview-card.is-active .lesson-preview-status {
  color: #75d5ad;
}

.lesson-preview-date {
  color: #b9aeb3;
  font-size: 0.72rem;
  line-height: 1.35;
}

.lesson-preview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lesson-preview-metrics > span {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #a99fa4;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.66rem;
}

.lesson-preview-metrics b {
  color: #f1e8ec;
}

.lesson-preview-card.is-compact .lesson-preview-copy {
  padding: 10px 11px 11px;
}

.lesson-preview-card.is-compact .lesson-preview-metrics > span:nth-child(2) {
  display: none;
}

.lesson-preview-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 180px;
  place-content: center;
  padding: 30px;
  color: #d9cfd4;
  text-align: center;
}

.lesson-preview-empty span {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.82rem;
}

.board-library-empty {
  grid-column: 1 / -1;
  padding: 50px 20px;
  color: #e7dfe3;
  text-align: center;
}

.teacher-black-folder-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #30282c, #090809 72%);
  font-weight: 900;
}

.teacher-black-folder-button:disabled {
  opacity: 0.5;
}

.file-type-icon {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #201b1e;
}

.file-type-icon::after {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.62);
  border-right: 2px solid rgba(255, 255, 255, 0.62);
  content: "";
}

.file-type-icon.is-board::before {
  width: 20px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow: inset 0 -4px 0 rgba(var(--cabinet-accent-rgb), 0.62);
  content: "";
}

.teacher-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 20px;
}

.teacher-brand,
.teacher-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-brand small,
.teacher-profile-card small,
.student-detail-meta,
.student-detail-top small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.teacher-brand strong,
.teacher-profile-card strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.teacher-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teacher-ghost-link,
.teacher-secondary-button,
.teacher-danger-button,
.teacher-text-button,
.teacher-primary-button,
.teacher-nav-button,
.student-filter-button {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 900;
}

.teacher-ghost-link,
.teacher-secondary-button,
.teacher-text-button {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.teacher-primary-button {
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(var(--cabinet-accent-rgb), 0.55);
  color: #fff7f8;
  background:
    linear-gradient(135deg, var(--cabinet-accent), var(--cabinet-accent-strong)),
    rgba(var(--cabinet-accent-rgb), 0.18);
  box-shadow: 0 16px 34px rgba(var(--cabinet-accent-rgb), 0.18);
}

.teacher-danger-button {
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(var(--cabinet-accent-rgb), 0.35);
  color: #ffc7cf;
  background: rgba(var(--cabinet-accent-rgb), 0.08);
}

.teacher-ghost-link:hover,
.teacher-secondary-button:hover,
.teacher-text-button:hover,
.teacher-primary-button:hover,
.teacher-danger-button:hover,
.teacher-nav-button:hover,
.student-filter-button:hover {
  transform: translateY(-1px);
}

.teacher-boot-view,
.teacher-auth-view {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.teacher-boot-pulse {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.teacher-boot-pulse span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  animation: teacherBootPulse 1s ease-in-out infinite;
}

.teacher-boot-pulse span:nth-child(2) {
  animation-delay: 0.16s;
}

.teacher-boot-pulse span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes teacherBootPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.teacher-auth-card {
  width: min(520px, 100%);
  padding: 34px;
  border-radius: 30px;
}

.teacher-auth-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.95;
}

.teacher-auth-card p {
  color: var(--muted);
  line-height: 1.55;
}

.teacher-auth-form,
.student-detail-form {
  display: grid;
  gap: 14px;
}

.teacher-auth-form label,
.student-detail-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.teacher-auth-form input,
.student-detail-form input,
.student-detail-form textarea,
.student-detail-form select,
.teacher-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(18, 15, 20, 0.96), rgba(10, 9, 12, 0.98)),
    rgba(255, 255, 255, 0.03);
  outline: none;
}

.teacher-auth-form input,
.student-detail-form input,
.student-detail-form select,
.teacher-search input {
  min-height: 46px;
  padding: 0 13px;
}

.student-detail-form textarea {
  resize: vertical;
  padding: 13px;
  line-height: 1.45;
}

.teacher-inline-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 91, 110, 0.35);
  border-radius: 12px;
  color: #ffc7cf;
  background: rgba(255, 91, 110, 0.08);
}

.teacher-text-button {
  width: 100%;
  margin-top: 12px;
  color: #ffb4bf;
  background: transparent;
}

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

.teacher-sidebar,
.teacher-workspace {
  border-radius: 24px;
}

.teacher-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.teacher-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #ff3853, #7d1a2d);
  box-shadow: 0 14px 30px rgba(255, 56, 83, 0.2);
  font-weight: 950;
}

.teacher-profile-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.teacher-nav {
  display: grid;
  gap: 8px;
}

.teacher-nav-button {
  width: 100%;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.teacher-nav-button.is-active {
  color: #fff7f8;
  background:
    linear-gradient(135deg, rgba(var(--cabinet-accent-rgb), 0.28), rgba(79, 18, 35, 0.44)),
    rgba(var(--cabinet-accent-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--cabinet-accent-rgb), 0.24);
}

.teacher-workspace {
  min-height: calc(100vh - 108px);
  padding: 18px;
}

.teacher-tab-panel {
  display: none;
}

.teacher-tab-panel.is-active {
  display: block;
}

.teacher-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.teacher-section-head h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.92;
}

.teacher-section-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.students-cabinet-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 14px;
}

.students-cabinet-list-card,
.student-detail-card,
.teacher-placeholder-card {
  border-radius: 22px;
}

.students-cabinet-list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 660px;
  overflow: hidden;
}

.students-cabinet-tools {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.teacher-search {
  position: relative;
  display: block;
}

.teacher-search span {
  position: absolute;
  top: 50%;
  left: 13px;
  color: #ff9eaa;
  transform: translateY(-50%);
}

.teacher-search input {
  padding-left: 36px;
}

.teacher-filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.student-filter-button {
  min-height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.student-filter-button.is-active {
  color: #fff7f8;
  background: rgba(255, 91, 110, 0.18);
}

.students-cabinet-list {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
}

.student-cabinet-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.032);
  text-align: left;
}

.student-cabinet-row.is-active {
  border-color: rgba(255, 91, 110, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 56, 83, 0.18), rgba(255, 255, 255, 0.035)),
    rgba(255, 91, 110, 0.06);
}

.student-cabinet-row-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff7f8;
  background: linear-gradient(135deg, #2a2329, #151217);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-weight: 950;
}

.student-cabinet-row strong,
.student-link-box strong,
.student-history-preview strong {
  display: block;
}

.student-cabinet-row small,
.students-cabinet-empty,
.student-empty-state p,
.student-link-box p,
.student-history-preview p,
.teacher-placeholder-card p {
  color: var(--muted);
  line-height: 1.5;
}

.students-cabinet-empty {
  margin: 0;
  padding: 18px 12px;
  text-align: center;
}

.student-cabinet-row-status {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
}

.student-cabinet-row.is-archived {
  opacity: 0.62;
}

.student-cabinet-row.is-archived .student-cabinet-row-status {
  background: #88818a;
}

.student-detail-card {
  min-height: 660px;
  padding: 18px;
}

.student-empty-state {
  display: grid;
  min-height: 620px;
  place-content: center;
  text-align: center;
}

.student-empty-state h2,
.teacher-placeholder-card h2,
.student-detail-top h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.student-detail-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.student-status-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #d9ffe9;
  background: rgba(140, 224, 184, 0.12);
  font-size: 0.68rem;
  font-weight: 950;
}

.student-status-pill.is-archived {
  color: #dbd2d7;
  background: rgba(255, 255, 255, 0.07);
}

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

.student-note-label {
  grid-column: 1 / -1;
}

.student-link-box,
.student-history-preview,
.money-settings-card,
.money-summary-card,
.money-metrics-card,
.money-breakdown-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.student-link-box p,
.student-history-preview p {
  margin: 4px 0 0;
  word-break: break-word;
}

.student-history-preview {
  display: block;
}

.student-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.teacher-placeholder-card {
  display: grid;
  min-height: 620px;
  place-content: center;
  padding: 28px;
  text-align: center;
}

.notification-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 14px;
}

.notification-settings-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--cabinet-accent-rgb), 0.13), transparent 32%),
    rgba(255, 255, 255, 0.034);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.notification-settings-card--hero {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 150px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 16%, rgba(var(--cabinet-accent-rgb), 0.3), transparent 36%),
    linear-gradient(135deg, rgba(59, 17, 30, 0.95), rgba(22, 13, 17, 0.96));
}

.notification-settings-card--hero h2,
.notification-settings-card h2 {
  margin: 0;
}

.notification-settings-card--hero p,
.notification-muted-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.notification-status-stack {
  display: grid;
  gap: 8px;
  min-width: 250px;
}

.notification-status-stack span {
  padding: 9px 11px;
  border: 1px solid rgba(var(--cabinet-accent-rgb), 0.24);
  border-radius: 14px;
  color: #fff6f7;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 850;
}

.notification-card-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}

.notification-card-head small,
.notification-student-select span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.notification-student-select {
  display: grid;
  gap: 6px;
  flex: 1 1 210px;
  max-width: 100%;
  min-width: min(210px, 100%);
}

.notification-student-select select,
.notification-reminder-form input[type="date"] {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  outline: none;
}

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

.notification-rule {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.notification-rule:hover {
  border-color: rgba(var(--cabinet-accent-rgb), 0.28);
  background: rgba(var(--cabinet-accent-rgb), 0.08);
}

.notification-rule.is-saving {
  opacity: 0.72;
  transform: translateY(1px);
}

.notification-rule input {
  appearance: none;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.notification-rule input::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.notification-rule input:checked {
  border-color: rgba(255, 91, 110, 0.5);
  background: linear-gradient(135deg, #b12b4d, #79213a);
}

.notification-rule input:checked::before {
  transform: translateX(18px);
  background: #fff7f8;
}

.notification-rule-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.notification-rule-body strong {
  color: var(--text);
}

.notification-rule-body small,
.notification-empty {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.38;
}

.notification-rule-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #f9d5dd;
  background: rgba(255, 91, 110, 0.1);
  border: 1px solid rgba(255, 91, 110, 0.18);
  font-size: 0.62rem;
  font-weight: 900;
  white-space: nowrap;
}

.notification-reminder-form {
  display: grid;
  gap: 10px;
}

.notification-reminder-form label:not(.notification-checkbox-line) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.notification-checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.notification-checkbox-line input {
  margin-top: 2px;
  accent-color: #b12b4d;
}

.notification-reminder-result {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(140, 224, 184, 0.2);
  border-radius: 14px;
  color: #dff8ea;
  background: rgba(35, 128, 88, 0.11);
}

.notification-reminder-result span {
  color: var(--muted);
  font-size: 0.72rem;
}

.lesson-history-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 14px;
}

.lesson-history-list-card,
.lesson-history-detail-card {
  min-height: 680px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--cabinet-accent-rgb), 0.12), transparent 30%),
    rgba(255, 255, 255, 0.032);
}

.lesson-history-list-card {
  overflow: hidden;
}

.lesson-history-search {
  display: block;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.lesson-history-search span {
  left: 27px;
}

.lesson-history-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 620px;
  overflow-y: auto;
  padding: 10px;
}

.lesson-history-row {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.lesson-history-row:hover,
.lesson-history-row.is-active {
  border-color: rgba(var(--cabinet-accent-rgb), 0.35);
  background:
    linear-gradient(135deg, rgba(var(--cabinet-accent-rgb), 0.19), rgba(255, 255, 255, 0.035)),
    rgba(var(--cabinet-accent-rgb), 0.05);
}

.lesson-history-row-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #746d72;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.035);
}

.lesson-history-row.is-live .lesson-history-row-dot {
  background: #ffd166;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.42);
}

.lesson-history-row.is-closing .lesson-history-row-dot,
.lesson-history-row.is-finalizing .lesson-history-row-dot {
  background: #e7a965;
  box-shadow: 0 0 16px rgba(231, 169, 101, 0.34);
}

.lesson-history-row.is-ended .lesson-history-row-dot {
  background: #8ce0b8;
}

.lesson-history-row.is-cancelled .lesson-history-row-dot {
  background: #8f7b86;
}

.lesson-history-row-copy {
  min-width: 0;
}

.lesson-history-row-copy strong,
.lesson-history-row-copy small {
  display: block;
}

.lesson-history-row-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-history-row-copy small,
.lesson-history-row-meta,
.lesson-history-muted,
.lesson-history-actions small {
  color: var(--muted);
}

.lesson-history-row-meta {
  font-size: 0.68rem;
  font-weight: 800;
  text-align: right;
}

.lesson-history-detail-card {
  padding: 18px;
}

.lesson-history-detail {
  display: grid;
  gap: 16px;
}

.lesson-history-detail-head,
.lesson-history-actions,
.lesson-history-participants-block > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lesson-history-detail-head h2,
.lesson-history-participants-block h3 {
  margin: 0;
}

.lesson-history-detail-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.lesson-history-muted {
  margin: 6px 0 0;
}

.lesson-history-status {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #ddd5da;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 900;
}

.lesson-history-status.is-live {
  color: #fff0bd;
  background: rgba(255, 209, 102, 0.13);
}

.lesson-history-status.is-ended {
  color: #d9ffe9;
  background: rgba(140, 224, 184, 0.12);
}

.lesson-history-status.is-closing,
.lesson-history-status.is-finalizing {
  color: #ffe5c2;
  background: rgba(231, 169, 101, 0.13);
}

.lesson-history-status.is-cancelled {
  color: #d6c8d0;
  background: rgba(143, 123, 134, 0.13);
}

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

.lesson-history-metrics article,
.lesson-history-participants-block {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.lesson-history-metrics span,
.lesson-history-metrics strong {
  display: block;
}

.lesson-history-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
}

.lesson-history-metrics strong {
  margin-top: 7px;
  font-size: 1.35rem;
}

.lesson-history-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lesson-history-participant {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: #d9d0d6;
  background: rgba(255, 255, 255, 0.055);
}

.lesson-history-participant::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #746d72;
  content: "";
}

.lesson-history-participant.is-present::before {
  background: #8ce0b8;
}

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

.lesson-history-form-grid label:first-child {
  grid-column: 1 / -1;
}

.lesson-history-form-grid textarea {
  min-height: 116px;
  resize: vertical;
}

.lesson-history-actions {
  align-items: center;
  padding-top: 2px;
}

.lesson-homework-files {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.lesson-homework-files.is-route-focus {
  animation: homework-route-focus 1.8s ease;
}

@keyframes homework-route-focus {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(214, 160, 52, 0);
  }

  24%,
  68% {
    box-shadow: 0 0 0 3px rgba(214, 160, 52, 0.38), 0 18px 48px rgba(76, 43, 8, 0.2);
  }
}

.lesson-homework-files-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.lesson-homework-files-heading h3 {
  margin: 4px 0 0;
}

.lesson-homework-files-heading select {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #fff8f9;
  background: #181316;
}

.lesson-homework-file-list {
  display: grid;
  gap: 8px;
}

.lesson-homework-file-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff8f9;
  background: #100d0f;
  text-align: left;
}

.lesson-homework-file-list button span {
  color: #c5536d;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lesson-homework-upload {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(197, 83, 109, 0.46);
  border-radius: 12px;
  color: #ffe5ea;
  background: rgba(143, 39, 62, 0.13);
  font-weight: 850;
  cursor: pointer;
}

.lesson-homework-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px;
  border: 1px solid rgba(226, 181, 78, 0.28);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(102, 69, 18, 0.22), rgba(255, 255, 255, 0.02));
}

.lesson-homework-workspace-copy {
  display: grid;
  gap: 4px;
}

.lesson-homework-workspace-copy span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #efce7d;
  background: rgba(195, 139, 31, 0.14);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lesson-homework-workspace-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.lesson-homework-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .lesson-homework-files-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-homework-files-heading select {
    width: 100%;
    min-width: 0;
  }

  .lesson-homework-workspace {
    grid-template-columns: 1fr;
  }

  .lesson-homework-workspace-actions {
    justify-content: stretch;
  }

  .lesson-homework-workspace-actions button {
    flex: 1 1 100%;
  }
}

.lesson-history-actions small {
  max-width: 520px;
  line-height: 1.45;
}

.lesson-history-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.schedule-cabinet-grid {
  display: grid;
  gap: 16px;
}

.schedule-board-card,
.schedule-pool-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--cabinet-accent-rgb), 0.15), transparent 32%),
    rgba(255, 255, 255, 0.032);
}

.schedule-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cabinet-schedule-day {
  min-width: 0;
  min-height: 410px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #211820, #100d11 76%, #0b090d);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.cabinet-schedule-day.is-student-drop-target {
  border-color: rgba(var(--cabinet-accent-rgb), 0.62);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--cabinet-accent-rgb), 0.26), transparent 44%),
    linear-gradient(180deg, rgba(54, 26, 34, 0.96), rgba(16, 11, 15, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(var(--cabinet-accent-rgb), 0.32),
    0 18px 42px rgba(var(--cabinet-accent-rgb), 0.12);
  transform: translateY(-2px);
}

.cabinet-schedule-day.is-slot-drop-target {
  border-color: rgba(var(--cabinet-gold-rgb), 0.62);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--cabinet-gold-rgb), 0.16), transparent 46%),
    linear-gradient(180deg, #2a1d24, #120d11 72%, #09080a);
  box-shadow:
    inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.24),
    0 18px 42px rgba(0, 0, 0, 0.24);
}

.cabinet-schedule-day-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 7px;
  align-items: center;
  padding: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cabinet-schedule-day-head strong {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff7f8;
  background: linear-gradient(135deg, var(--cabinet-accent), var(--cabinet-accent-strong));
  font-size: 0.78rem;
  font-weight: 950;
}

.cabinet-schedule-day-head span {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 950;
}

.cabinet-schedule-day-head small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.cabinet-schedule-day-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 100%;
  padding: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 18px 18px;
}

.cabinet-schedule-day-list.is-student-drop-target {
  background:
    linear-gradient(90deg, rgba(var(--cabinet-accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(rgba(var(--cabinet-accent-rgb), 0.08) 1px, transparent 1px),
    rgba(var(--cabinet-accent-rgb), 0.05);
  background-size: 18px 18px;
}

.cabinet-schedule-day-list.is-slot-drop-tail {
  position: relative;
}

.cabinet-schedule-day-list.is-slot-drop-tail::after {
  display: block;
  height: 5px;
  margin: 7px 2px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff1c9, var(--cabinet-gold), #fff1c9, transparent);
  box-shadow:
    0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.28),
    0 0 22px rgba(var(--cabinet-gold-rgb), 0.4);
  content: "";
}

.cabinet-schedule-empty,
.cabinet-schedule-pool-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.cabinet-schedule-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  text-align: center;
}

.cabinet-schedule-slot {
  position: relative;
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto;
  gap: 7px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #2a2028, #181117 78%, #120e13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 22px rgba(0, 0, 0, 0.16);
  cursor: grab;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.cabinet-schedule-slot.is-dragging {
  cursor: grabbing;
  opacity: 0.46;
  transform: scale(0.98);
}

.cabinet-schedule-slot.is-slot-swap-source {
  opacity: 0.86;
  border-color: rgba(var(--cabinet-gold-rgb), 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.16),
    0 14px 30px rgba(0, 0, 0, 0.2);
}

.cabinet-schedule-slot.is-slot-swap-target {
  border-color: rgba(var(--cabinet-gold-rgb), 0.78);
  background:
    linear-gradient(135deg, rgba(62, 42, 29, 0.92), rgba(31, 18, 22, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.28),
    0 0 0 3px rgba(var(--cabinet-gold-rgb), 0.11),
    0 16px 36px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.cabinet-schedule-slot.is-slot-neighbor-swap {
  animation: schedule-neighbor-pulse 680ms ease-in-out infinite alternate;
}

.cabinet-schedule-slot.is-slot-swap-source.is-swap-down {
  transform: translateY(12px) scale(0.99);
}

.cabinet-schedule-slot.is-slot-swap-source.is-swap-up {
  transform: translateY(-12px) scale(0.99);
}

.cabinet-schedule-slot.is-slot-neighbor-swap.is-swap-up {
  transform: translateY(-12px);
}

.cabinet-schedule-slot.is-slot-neighbor-swap.is-swap-down {
  transform: translateY(12px);
}

.cabinet-schedule-slot.is-just-updated {
  animation: schedule-slot-saved-flash 1650ms ease both;
}

.cabinet-schedule-slot.is-drop-before::before,
.cabinet-schedule-slot.is-drop-after::after {
  position: absolute;
  right: 6px;
  left: 6px;
  z-index: 2;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff1c9, var(--cabinet-gold), #fff1c9, transparent);
  box-shadow:
    0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.28),
    0 0 24px rgba(var(--cabinet-gold-rgb), 0.46);
  content: "";
}

.cabinet-schedule-slot.is-drop-before::before {
  top: -8px;
}

.cabinet-schedule-slot.is-drop-after::after {
  bottom: -8px;
}

.cabinet-schedule-time {
  width: 86px;
  min-height: 34px;
  padding: 0 4px;
  border: 1px solid rgba(var(--cabinet-accent-rgb), 0.28);
  border-radius: 11px;
  color: #fff7f8;
  background:
    linear-gradient(180deg, rgba(var(--cabinet-accent-rgb), 0.36), rgba(35, 19, 26, 0.94));
  font-size: 0.82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: text;
}

@keyframes schedule-slot-saved-flash {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  18%,
  68% {
    border-color: rgba(var(--cabinet-gold-rgb), 0.7);
    background:
      linear-gradient(135deg, rgba(63, 43, 29, 0.94), rgba(31, 19, 23, 0.98));
    box-shadow:
      inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.2),
      0 0 0 3px rgba(var(--cabinet-gold-rgb), 0.08),
      0 18px 40px rgba(0, 0, 0, 0.18);
  }
}

@keyframes schedule-neighbor-pulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.24),
      0 0 0 3px rgba(var(--cabinet-gold-rgb), 0.1),
      0 16px 36px rgba(0, 0, 0, 0.24);
  }

  to {
    box-shadow:
      inset 0 0 0 1px rgba(var(--cabinet-gold-rgb), 0.42),
      0 0 0 5px rgba(var(--cabinet-gold-rgb), 0.16),
      0 18px 42px rgba(0, 0, 0, 0.3);
  }
}

.cabinet-schedule-student {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.cabinet-schedule-student strong,
.cabinet-schedule-student small,
.cabinet-schedule-student-chip strong,
.cabinet-schedule-student-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-schedule-student small,
.cabinet-schedule-student-chip small {
  color: var(--muted);
  font-size: 0.7rem;
}

.cabinet-schedule-student strong {
  font-size: 0.82rem;
}

.cabinet-schedule-delete {
  min-height: 30px;
  padding: 0 7px;
  border-radius: 10px;
  color: rgba(255, 199, 207, 0.82);
  background: rgba(var(--cabinet-accent-rgb), 0.08);
  font-size: 0.62rem;
  font-weight: 950;
}

.cabinet-schedule-delete:hover {
  color: #fff;
  background: rgba(var(--cabinet-accent-rgb), 0.2);
}

.schedule-pool-card {
  display: grid;
  gap: 12px;
}

.schedule-pool-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.schedule-pool-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
}

.schedule-pool-head small {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.45;
}

.schedule-student-pool {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px;
}

.cabinet-schedule-student-chip {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(34, 28, 34, 0.96), rgba(14, 12, 15, 0.98));
  cursor: grab;
}

.cabinet-schedule-student-chip:hover,
.cabinet-schedule-student-chip.is-dragging {
  border-color: rgba(var(--cabinet-accent-rgb), 0.36);
  background:
    linear-gradient(135deg, rgba(68, 30, 39, 0.92), rgba(20, 15, 20, 0.98));
}

.cabinet-schedule-student-chip.is-dragging {
  opacity: 0.55;
}

.cabinet-schedule-student-chip > span:first-child {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--cabinet-accent), var(--cabinet-accent-strong));
  font-size: 0.82rem;
  font-weight: 950;
}

.cabinet-schedule-student-chip > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.money-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: 16px;
}

.money-settings-card,
.money-summary-card,
.money-metrics-card,
.money-breakdown-card {
  align-items: stretch;
  border-radius: 22px;
}

.money-settings-card,
.money-breakdown-card {
  display: grid;
  gap: 14px;
}

.money-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: 24px;
  min-height: 320px;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 91, 110, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(35, 27, 34, 0.96), rgba(13, 11, 15, 0.98));
}

.money-settings-card h2,
.money-summary-card h2,
.money-breakdown-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
}

.money-settings-card p,
.money-summary-card p {
  color: var(--muted);
  line-height: 1.5;
}

.money-rate-form {
  display: grid;
  gap: 12px;
}

.money-rate-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.money-rate-form input {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(18, 15, 20, 0.96), rgba(10, 9, 12, 0.98)),
    rgba(255, 255, 255, 0.03);
  outline: none;
}

.money-donut {
  --money-donut-fill: conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.08) 0deg);
  position: relative;
  display: grid;
  width: clamp(240px, 24vw, 320px);
  aspect-ratio: 1;
  place-items: center;
  flex: 0 0 auto;
  justify-self: end;
  border-radius: 50%;
  background: var(--money-donut-fill);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 50px rgba(255, 56, 83, 0.16);
}

.money-donut::after {
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(17, 14, 18, 0.98), rgba(8, 7, 10, 0.98));
  content: "";
}

.money-donut span {
  position: relative;
  z-index: 1;
  max-width: 150px;
  color: #fff7f8;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  font-weight: 950;
  text-align: center;
}

.money-metrics-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 10px;
}

.money-metric {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
}

.money-metric span,
.money-breakdown-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.money-metric strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
}

.money-breakdown-card {
  grid-column: 1 / -1;
}

.money-breakdown-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.money-breakdown-list {
  display: grid;
  gap: 8px;
}

.money-breakdown-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.032);
}

.money-breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--money-color, var(--accent));
}

.money-breakdown-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.money-breakdown-value {
  color: #fff7f8;
  font-weight: 950;
  text-align: right;
}

.teacher-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border: 1px solid rgba(255, 91, 110, 0.28);
  border-radius: 14px;
  color: #fff7f8;
  background: rgba(18, 15, 20, 0.96);
  box-shadow: var(--shadow);
}

.teacher-toast.is-error {
  border-color: rgba(255, 91, 110, 0.5);
  color: #ffc7cf;
}

@media (max-width: 980px) {
  .teacher-dashboard,
  .students-cabinet-grid,
  .lesson-history-grid {
    grid-template-columns: 1fr;
  }

  .lesson-history-list-card,
  .lesson-history-detail-card {
    min-height: auto;
  }

  .lesson-history-list {
    max-height: 360px;
  }

  .teacher-sidebar {
    position: static;
  }

  .teacher-nav {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .teacher-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-history-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-settings-grid,
  .notification-settings-card--hero {
    grid-template-columns: 1fr;
  }

  .notification-status-stack {
    min-width: 0;
  }

  .lesson-history-toolbar p,
  .audit-toolbar p {
    max-width: none;
    text-align: left;
  }

  .audit-event-row {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .audit-event-details {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .schedule-board {
    grid-template-columns: repeat(7, minmax(180px, 220px));
  }

  .cabinet-schedule-day {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .teacher-shell {
    width: min(100% - 20px, 1500px);
  }

  .teacher-topbar,
  .student-link-box,
  .student-detail-actions,
  .money-breakdown-head {
    align-items: stretch;
    flex-direction: column;
  }

  .student-form-grid,
  .teacher-filter-row,
  .money-grid,
  .money-metrics-card,
  .money-summary-card,
  .audit-summary-grid,
  .lesson-history-form-grid,
  .lesson-history-metrics {
    grid-template-columns: 1fr;
  }

  .lesson-history-form-grid label:first-child {
    grid-column: auto;
  }

  .lesson-history-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-student-select {
    min-width: 0;
  }

  .notification-rule {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-rule-badge {
    grid-column: 2;
    justify-self: start;
  }

  .schedule-pool-head,
  .cabinet-schedule-slot {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .schedule-pool-head {
    flex-direction: column;
  }

  .cabinet-schedule-time {
    width: 100%;
  }

  .money-donut {
    justify-self: center;
    width: min(280px, 76vw);
  }

  .teacher-auth-card {
    padding: 24px;
  }

  .lesson-history-matrix,
  .student-lesson-matrix {
    grid-template-columns: 1fr;
  }

  .lesson-history-matrix {
    padding: 12px;
  }

  .student-history-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-history-heading span {
    text-align: left;
  }
}
