:root {
  --green: #187766;
  --green-dark: #0f574c;
  --mint: #e9f7f2;
  --red: #d94841;
  --coral: #ffebe8;
  --gold: #f6b93b;
  --ink: #17312d;
  --muted: #667a76;
  --line: #d9e7e2;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(20, 68, 59, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(24, 119, 102, 0.12), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, #f4fbf8 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: center;
}

.feedback-panel {
  width: min(100%, 760px);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(24, 119, 102, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.brand-logo {
  width: clamp(168px, 36vw, 260px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  display: grid;
  gap: 6px;
}

.brand-kicker {
  margin: 0 0 2px;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--green-dark);
  font-size: clamp(24px, 4.4vw, 38px);
  line-height: 1.08;
}

.intro {
  padding: 20px;
  border-radius: 18px;
  background: var(--mint);
  color: #24423d;
  line-height: 1.58;
}

.feedback-form {
  display: grid;
  gap: 24px;
  margin-top: 26px;
}

.question-block,
.follow-up-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.question-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.question-heading h2,
.follow-up-card h2 {
  margin-bottom: 0;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.2;
}

.question-heading p,
.follow-up-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.stars-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars-wrapper-large {
  gap: 12px;
}

.stars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-emoji {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.72);
  pointer-events: none;
  user-select: none;
}

.stars-wrapper-large .rating-emoji {
  width: 46px;
  height: 46px;
  font-size: 36px;
}

.rating-emoji.is-visible {
  animation: emoji-pop 280ms ease both;
}

.star-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c7d3cf;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  transform: scale(1);
  transition: color 180ms ease, transform 180ms ease, filter 180ms ease;
}

.stars-large .star-button {
  width: 52px;
  height: 52px;
  font-size: 42px;
}

.star-button.is-active {
  color: var(--gold);
  filter: drop-shadow(0 4px 8px rgba(246, 185, 59, 0.3));
  animation: star-pop 280ms ease both;
}

.star-button:hover,
.star-button:focus-visible {
  color: var(--gold);
  outline: none;
  transform: scale(1.12);
}

.stars.is-locked .star-button {
  cursor: default;
}

.stars.is-locked .star-button:hover,
.stars.is-locked .star-button:focus-visible {
  transform: none;
}

@keyframes star-pop {
  0% {
    transform: scale(0.75) rotate(-8deg);
  }
  70% {
    transform: scale(1.18) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes emoji-pop {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  62% {
    opacity: 1;
    transform: scale(1.16);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.employee-list {
  display: grid;
  gap: 12px;
}

.employee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfffd;
}

.employee-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 165px;
}

.employee-avatar-frame {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 2px solid var(--mint);
  border-radius: 50%;
  background: var(--mint);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(20, 68, 59, 0.1);
}

.employee-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}

.employee-avatar-admin {
  transform: scale(1.08) translateY(1px);
}

.employee-avatar-doctor {
  transform: scale(1.11) translateY(0);
}

.employee-avatar-assistent {
  transform: scale(1.14) translateY(-1px);
}

.employee-role {
  color: var(--ink);
  font-weight: 700;
}

.follow-up {
  min-height: 0;
}

.follow-up-card {
  display: grid;
  gap: 16px;
  animation: fade-up 260ms ease both;
}

.review-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-link,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.review-link:nth-child(2) {
  background: #d94841;
}

.review-link:nth-child(3) {
  background: #24423d;
}

.review-link:hover,
.primary-button:hover,
.review-link:focus-visible,
.primary-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.comment-box {
  display: grid;
  gap: 12px;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 119, 102, 0.12);
  outline: none;
}

.follow-up-card .low-rating-message {
  color: #000000;
  font-size: clamp(19px, 4vw, 25px);
  font-weight: 700;
  line-height: 1.46;
}

.low-rating-action {
  justify-self: start;
}

.signature {
  margin-bottom: 0;
  color: var(--green-dark);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 87, 76, 0.32);
  backdrop-filter: blur(7px);
}

.modal-card {
  position: relative;
  display: grid;
  width: min(100%, 420px);
  gap: 12px;
  justify-items: center;
  padding: 30px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  animation: fade-up 220ms ease both;
}

.success-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 36px;
  font-weight: 900;
}

.modal-card h2,
.modal-card p {
  margin-bottom: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px;
    place-items: start center;
  }

  .feedback-panel {
    border-radius: 18px;
  }

  .brand-header {
    display: grid;
    gap: 14px;
  }

  .brand-logo {
    width: min(100%, 240px);
  }

  .stars-large {
    gap: 4px;
  }

  .stars-large .star-button {
    width: 44px;
    height: 44px;
    font-size: 36px;
  }

  .employee-row {
    display: grid;
    gap: 8px;
  }

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