.coach-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: end;
  padding-bottom: 26px;
}

.coach-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.8rem);
}

.coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.coach-status-card {
  border: 1px solid rgba(51, 209, 96, 0.25);
  background: rgba(51, 209, 96, 0.08);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.coach-status-card p {
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.55;
}

.coach-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 14px;
}

.coach-sidebar {
  position: sticky;
  top: 130px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.045);
  border-radius: 24px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.coach-chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-weight: 850;
}

.coach-chip:hover {
  border-color: rgba(51, 209, 96, 0.28);
  background: rgba(51, 209, 96, 0.08);
}

.coach-chat-shell {
  min-height: 640px;
}

.coach-app {
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 20% 10%, rgba(51, 209, 96, 0.10), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.03));
  border-radius: 30px;
  overflow: hidden;
}

.coach-chat {
  height: min(68vh, 720px);
  min-height: 520px;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.coach-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.coach-message.user {
  justify-content: flex-end;
}

.coach-message.user .message-avatar {
  order: 2;
  background: rgba(214,168,80,0.14);
  color: var(--gold);
}

.coach-message.user .message-bubble {
  background: rgba(214,168,80,0.09);
  border-color: rgba(214,168,80,0.22);
}

.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(51,209,96,0.12);
  color: var(--green);
  border: 1px solid rgba(255,255,255,0.10);
  font-weight: 950;
}

.message-bubble {
  max-width: 780px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  border-radius: 20px;
  padding: 16px 18px;
}

.message-bubble strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.message-bubble p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.message-bubble ul,
.message-bubble ol {
  color: var(--muted);
  line-height: 1.75;
  margin: 10px 0 0;
  padding-left: 22px;
}

.coach-form {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.coach-form input {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.055);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

.coach-form input:focus {
  border-color: rgba(51,209,96,0.38);
}

@media (max-width: 960px) {
  .coach-hero,
  .coach-layout {
    grid-template-columns: 1fr;
  }

  .coach-sidebar {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .coach-sidebar {
    grid-template-columns: 1fr;
  }

  .coach-form {
    grid-template-columns: 1fr;
  }

  .coach-chat {
    min-height: 480px;
  }
}
