:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211d;
  background: #f5f8f6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0, rgba(225, 242, 231, 0.55), transparent 36rem),
    #f5f8f6;
}

button,
a {
  font: inherit;
}

.page {
  width: min(840px, 100% - 2rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.3rem;
  color: #64736c;
  font-size: 0.84rem;
  font-weight: 580;
  text-decoration: none;
}

.back-link:hover {
  color: #0b7b5b;
}

.page-intro {
  margin-bottom: 1.7rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  color: #0b7b5b;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.eyebrow::before {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #17a875;
  content: "";
}

.page-intro h1 {
  margin: 0;
  color: #17372a;
  font-size: clamp(1.85rem, 5vw, 2.65rem);
  font-weight: 760;
  letter-spacing: -0.055em;
}

.page-intro > p:last-child {
  margin: 0.55rem 0 0;
  color: #687970;
  font-size: 0.92rem;
  line-height: 1.6;
}

.requests-panel {
  overflow: hidden;
  border: 1px solid #e3ebe6;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(15, 40, 28, 0.055);
}

.request-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid #e8eeea;
  background: #fbfcfb;
  padding: 0.65rem 1.1rem 0;
}

.request-tab {
  position: relative;
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 0.65rem 0.65rem 0 0;
  background: transparent;
  padding: 0.65rem 0.9rem;
  color: #748179;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 650;
}

.request-tab:hover,
.request-tab:focus-visible {
  color: #0b7b5b;
  outline: none;
}

.request-tab.is-active {
  color: #0b7b5b;
}

.request-tab.is-active::after {
  position: absolute;
  right: 0.6rem;
  bottom: -1px;
  left: 0.6rem;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #0b7b5b;
  content: "";
}

.count-badge {
  display: grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 1px solid #dcebe1;
  border-radius: 999px;
  background: #eaf4ee;
  padding: 0 0.35rem;
  color: #0b7b5b;
  font-size: 0.72rem;
  font-weight: 750;
}

.request-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.request-panel.hidden {
  display: none;
}

.panel-heading {
  margin-bottom: 1.1rem;
}

.panel-heading h2 {
  margin: 0;
  color: #26382e;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 0.3rem 0 0;
  color: #78867f;
  font-size: 0.8rem;
}

.request-list {
  display: grid;
  gap: 0.7rem;
}

.request-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid #e8eeeb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.8rem;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.request-card:hover {
  border-color: #c9dfd2;
  background: #fcfefc;
  box-shadow: 0 5px 14px rgba(15, 40, 28, 0.045);
}

.request-avatar {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 1rem;
  background: linear-gradient(145deg, #e4f4e9, #cce9d8);
  color: #0b7b5b;
  font-size: 1.05rem;
  font-weight: 750;
  box-shadow: 0 0 0 1px #e3eee7;
}

.request-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.request-copy {
  min-width: 0;
  flex: 1;
}

.request-name {
  display: block;
  overflow: hidden;
  color: #23342b;
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-name:hover {
  color: #0b7b5b;
}

.request-bio {
  overflow: hidden;
  margin: 0.28rem 0 0;
  color: #78867f;
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-actions {
  display: flex;
  flex: none;
  gap: 0.45rem;
}

.request-actions button,
.request-profile-link {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e3dc;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.48rem 0.75rem;
  color: #3c5146;
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 660;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.request-actions button:hover,
.request-profile-link:hover {
  border-color: #0b7b5b;
  background: #f1f8f4;
  color: #0b7b5b;
}

.request-actions .accept-button {
  border-color: #0b7b5b;
  background: #0b7b5b;
  color: #fff;
}

.request-actions .accept-button:hover {
  border-color: #08674c;
  background: #08674c;
  color: #fff;
}

.request-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.request-empty {
  display: grid;
  justify-items: center;
  border: 1px dashed #d8e5dc;
  border-radius: 0.95rem;
  background: #fafcfa;
  padding: 2.1rem 1rem;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ee;
  color: #0b7b5b;
  font-size: 1.15rem;
  font-weight: 750;
}

.request-empty h3 {
  margin: 0.8rem 0 0;
  color: #26382e;
  font-size: 0.94rem;
}

.request-empty p {
  margin: 0.4rem 0 0.9rem;
  color: #78867f;
  font-size: 0.8rem;
  line-height: 1.5;
}

.request-empty a {
  border-radius: 0.6rem;
  background: #0b7b5b;
  padding: 0.56rem 0.85rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 660;
  text-decoration: none;
}

.section-status {
  margin: 0;
  padding: 1.25rem 0;
  color: #718078;
  font-size: 0.84rem;
  text-align: center;
}

.section-status:empty,
.section-status.hidden {
  display: none;
}

.section-status.is-error {
  color: #b42318;
}

.retry-button {
  display: block;
  margin: 0 auto 0.5rem;
  border: 1px solid #d7e3dc;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.55rem 0.85rem;
  color: #315341;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
}

.request-toast {
  position: fixed;
  z-index: 10;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(26rem, calc(100% - 2rem));
  margin: 0;
  border: 1px solid #cae6d5;
  border-radius: 0.8rem;
  background: #f3fbf6;
  padding: 0.85rem 1rem;
  color: #176343;
  font-size: 0.86rem;
  font-weight: 620;
  box-shadow: 0 10px 30px rgba(12, 60, 34, 0.15);
  animation: toast-in 180ms ease-out;
}

.hidden {
  display: none !important;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 1rem, 480px);
    padding-top: 1.15rem;
  }

  .page-intro {
    margin-bottom: 1.2rem;
  }

  .request-tabs {
    padding: 0.45rem 0.55rem 0;
  }

  .request-tab {
    min-height: 2.8rem;
    flex: 1;
    justify-content: center;
    padding: 0.55rem 0.4rem;
    font-size: 0.8rem;
  }

  .request-panel {
    padding: 0.9rem;
  }

  .request-card {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.7rem;
  }

  .request-avatar {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.85rem;
  }

  .request-actions {
    width: 100%;
    padding-left: 3.45rem;
  }

  .request-actions button,
  .request-profile-link {
    flex: 1;
  }

  .request-toast {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
