* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f2f8f5;
  color: #10231b;
}

main {
  max-width: 1150px;
  margin: auto;
  padding: 8vh 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
}

.hero > div:first-child {
  padding-top: 140px;
  align-self: start;
  position: sticky;
  top: 20px;
}

h1 {
  font-size: 64px;
  line-height: 1;
  margin: 20px 0;
}

p {
  font-size: 20px;
  color: #617169;
  line-height: 1.5;
}

form {
  background: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 18px 50px #1232;
}

input,
button {
  width: 100%;
  padding: 14px;
  margin: 7px 0;
  border-radius: 11px;
  font-size: 16px;
}

input {
  border: 1px solid #bfd0c7;
}

button {
  border: 0;
  background: #18794e;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}

.secondary-button {
  background: #e5f3eb;
  color: #145c3d;
}

#result {
  padding-top: 10px;
  margin-top: 18px;
  line-height: 1.4;
}

.course-result {
  display: grid;
  gap: 12px;
}

.result-heading {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.result-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(10, 54, 38, 0.14);
  font-size: 0.9rem;
}

.result-summary span {
  color: #66766f;
}

.result-summary strong {
  text-align: right;
}

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

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 54, 38, 0.12);
  border-radius: 10px;
  background: rgba(246, 250, 248, 0.9);
}

.section-main {
  display: grid;
  gap: 3px;
}

.section-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-row span {
  font-size: 0.82rem;
  color: #66766f;
}

.gender-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(10, 54, 38, 0.16);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  color: #52635c;
  background: rgba(255, 255, 255, 0.7);
}

.instructor-name,
.class-days,
.class-time {
  font-size: 0.82rem;
  color: #52635c;
  font-weight: 500;
}

.seat-count {
  font-weight: 700;
  white-space: nowrap;
}

.no-seats,
.result-loading,
.result-error,
.watch-success {
  line-height: 1.45;
}

.result-error {
  color: #9f2f2f;
}

.watch-success {
  font-weight: 600;
}

/* Manage watches */
.manage-page {
  max-width: 850px;
}

.manage-card {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 18px 50px #1232;
}

.manage-title {
  font-size: 44px;
  margin-bottom: 8px;
}

.manage-copy {
  font-size: 17px;
  margin-top: 0;
}

.watch-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.watch-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(10, 54, 38, 0.12);
  border-radius: 14px;
  background: #f8fbf9;
}

.watch-info {
  display: grid;
  gap: 4px;
}

.watch-info span {
  color: #66766f;
  font-size: 0.88rem;
}

.stop-form {
  box-shadow: none;
  background: transparent;
  padding: 0;
  min-width: 150px;
}

.danger-button {
  background: #8f3434;
  margin: 0;
}

.empty-watches {
  margin: 26px 0;
  padding: 20px;
  border-radius: 14px;
  background: #f8fbf9;
  color: #66766f;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  color: #18794e;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  main {
    padding: 35px 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero > div:first-child {
    padding-top: 0;
    position: static;
  }

  h1 {
    font-size: 46px;
  }

  .watch-item {
    flex-direction: column;
    align-items: stretch;
  }

  .stop-form {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .result-summary,
  .section-row {
    align-items: flex-start;
  }

  .result-summary {
    flex-direction: column;
  }

  .section-row {
    gap: 10px;
  }
}
