* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0c0a13;
  --panel: #151221;
  --panel-soft: #1d1830;
  --gold: #d4a843;
  --gold-light: #f0d58c;
  --text: #eeeaf6;
  --muted: #afa7c2;
  --line: rgba(212, 168, 67, 0.22);
  --green: #2ecc71;
  --red: #e74c3c;
  --blue: #5dade2;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 58, 146, 0.28), transparent 34%),
    linear-gradient(180deg, #120f1e 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Raleway", sans-serif;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 0 26px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  color: #fff;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.8rem;
}

.brand span,
.muted {
  color: var(--muted);
}

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

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

.panel,
.lesson,
.client-row,
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(21, 18, 33, 0.9);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.panel {
  padding: 22px;
}

.panel h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 12px;
}

.panel h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.stack {
  display: grid;
  gap: 14px;
}

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

.field label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--bg);
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}

.btn.secondary {
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn.danger {
  background: rgba(231, 76, 60, 0.14);
  color: #ffb2aa;
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.btn.small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-light);
  font-size: 1.8rem;
}

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

.module-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(21, 18, 33, 0.64);
}

.module-group summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.module-group summary small {
  color: var(--gold-light);
  font-size: 0.78rem;
  white-space: nowrap;
}

.module-lessons {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.client-row,
.lesson {
  padding: 16px;
}

.module-lessons .lesson {
  padding: 12px;
}

.lesson-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.lesson-open {
  min-width: 0;
}

.completed-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  cursor: pointer;
}

.completed-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.completed-check span {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.completed-check input:checked + span {
  border-color: rgba(46, 204, 113, 0.7);
  background: rgba(46, 204, 113, 0.18);
}

.completed-check input:checked + span::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 6px;
  border-left: 2px solid #b9ffd5;
  border-bottom: 2px solid #b9ffd5;
  transform: translate(6px, 7px) rotate(-45deg);
}

.client-main,
.lesson-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.lesson-title {
  margin-bottom: 6px;
  font-weight: 900;
}

.lesson button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.lesson.active {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge.active {
  color: #b9ffd5;
  background: rgba(46, 204, 113, 0.14);
  border: 1px solid rgba(46, 204, 113, 0.32);
}

.badge.pending {
  color: #ffe7a3;
  background: rgba(212, 168, 67, 0.14);
  border: 1px solid rgba(212, 168, 67, 0.32);
}

.badge.paused {
  color: #bcdfff;
  background: rgba(93, 173, 226, 0.14);
  border: 1px solid rgba(93, 173, 226, 0.32);
}

.code {
  margin-top: 8px;
  color: var(--gold-light);
  font-weight: 800;
  word-break: break-word;
}

.resource-box {
  margin-top: 16px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(212, 168, 67, 0.2);
}

.resource-link:hover {
  transform: translateY(-1px);
}

.resource-link.small-link {
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.bonus-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bonus-section h2 {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.bonus-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bonus-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(212, 168, 67, 0.06);
}

.bonus-item h3 {
  font-size: 1.22rem;
  margin-bottom: 4px;
}

.video-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #05040a;
  aspect-ratio: 16 / 9;
}

.video-shell iframe,
.video-placeholder {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.notice {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  color: #ffe7a3;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.22);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 880px) {
  .app {
    padding: 16px;
  }

  .top,
  .client-main {
    flex-direction: column;
    align-items: stretch;
  }

  .grid,
  .student-layout,
  .stats {
    grid-template-columns: 1fr;
  }

  .bonus-item {
    grid-template-columns: 1fr;
  }

  .resource-link.small-link {
    width: 100%;
  }
}
