:root {
  color-scheme: light;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --line: rgba(23, 50, 77, 0.08);
  --line-strong: rgba(23, 50, 77, 0.14);
  --text: #17324d;
  --muted: #69829a;
  --accent-deep: #0f4e92;
  --shadow: 0 24px 70px rgba(34, 65, 102, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-width: 320px;
  color: var(--text);
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(110, 171, 216, 0.18), transparent 28%),
    linear-gradient(180deg, #f3f7fb 0%, #eef4f8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__brand:hover .topbar__title,
.topbar__brand:focus-visible .topbar__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.topbar__brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f79d1 0%, #43a1f7 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(31, 121, 209, 0.28);
}

.topbar__title,
.content-card__title,
.editor-card__title {
  margin: 0;
  line-height: 1.05;
}

.topbar__title {
  font-size: clamp(24px, 2vw, 30px);
}

.workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.sidebar,
.builder-panel,
.schedule-panel,
.content-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar,
.builder-panel,
.schedule-panel,
.content-card {
  border-radius: 28px;
}

.sidebar,
.builder-panel,
.schedule-panel {
  padding: 22px;
}

.sidebar__menu {
  display: grid;
  gap: 10px;
}

.sidebar__link {
  display: block;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.sidebar__link:hover,
.sidebar__link:focus-visible {
  transform: translateX(4px);
  border-color: var(--line-strong);
  background: #fff;
  outline: none;
}

.sidebar__link--active {
  border-color: rgba(31, 121, 209, 0.18);
  background: linear-gradient(180deg, rgba(31, 121, 209, 0.14) 0%, rgba(31, 121, 209, 0.05) 100%);
  color: var(--text);
}

.content {
  display: grid;
  gap: 18px;
}

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

.editor-card {
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.editor-card__title {
  font-size: 22px;
}

.editor-card__count {
  margin: 16px 0 8px;
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent-deep);
}

.editor-card__list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.editor-card__list li + li {
  margin-top: 4px;
}

.editor-card__empty {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.schedule-board {
  display: grid;
  grid-template-columns: 96px repeat(6, minmax(150px, 1fr));
  gap: 12px;
}

.schedule-board__header,
.schedule-board__time,
.lesson-slot {
  border: 1px solid var(--line);
  border-radius: 22px;
}

.schedule-board__header {
  padding: 14px;
  background: rgba(18, 50, 77, 0.94);
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.schedule-board__time {
  display: grid;
  place-items: center;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent-deep);
  font-weight: 700;
}

.lesson-slot {
  min-height: 120px;
  background: rgba(255, 255, 255, 0.88);
}

.lesson-slot--empty {
  background: linear-gradient(180deg, rgba(238, 245, 251, 0.92) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.content-card {
  padding: 24px;
}

.content-card__title {
  font-size: 28px;
}

.content-card__text {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

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

.teacher-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
}

.teacher-card__content--full {
  grid-column: 1 / -1;
}

.teacher-card__avatar img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 24px;
}

.teacher-card__title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.1;
}

.teacher-card__meta {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.6;
}

.teacher-card__meta li + li {
  margin-top: 6px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .builder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-board {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .teacher-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

  .builder-grid {
    grid-template-columns: 1fr;
  }

  .schedule-board {
    grid-template-columns: 80px repeat(6, minmax(160px, 1fr));
  }

  .teacher-card {
    grid-template-columns: 1fr;
  }
}
