.application-profile-page .main-content {
  min-height: 0;
}

.profile-layout {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px clamp(46px, 7vw, 110px) 36px;
}

.profile-card {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 62px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(8, 11, 18, 0.18);
}

.profile-kicker {
  margin: 0;
  color: #7c2948;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile-card h2 {
  margin: 12px 0 18px;
  color: #111318;
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.profile-card > p:not(.profile-kicker, .profile-message, .version-label, .version-note) {
  max-width: 690px;
  margin: 0;
  color: #4c5260;
  font-size: 1.02rem;
  line-height: 1.7;
}

.profile-login {
  max-width: 590px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: end;
}

.profile-login label {
  grid-column: 1 / -1;
  color: #272a31;
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-login input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid #aeb3bf;
  border-radius: 10px;
  background: #fff;
  color: #16181d;
  font: inherit;
}

.profile-login button,
.download-button,
.logout-button {
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--pink);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.profile-login button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  color: #fff;
}

.logout-button {
  background: transparent;
  color: #822b4b;
}

.profile-login button:hover,
.download-button:hover {
  border-color: #922e51;
  background: #922e51;
}

.logout-button:hover {
  background: #fff0f5;
}

.profile-message {
  max-width: 690px;
  margin: 24px 0 0;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 0.93rem;
  line-height: 1.55;
}

.profile-error {
  border: 1px solid #b64160;
  background: #fff1f4;
  color: #7c1938;
}

.profile-auth-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.profile-auth-heading h2 {
  margin-bottom: 0;
}

.version-label {
  margin: 30px 0 0;
  padding: 14px 17px;
  border-left: 4px solid var(--pink);
  background: #f1f2f6;
  color: #242730;
  font-weight: 700;
  line-height: 1.45;
}

.version-note {
  margin: 13px 0 0;
  color: #5b606c;
  font-size: 0.92rem;
  line-height: 1.6;
}

.document-list {
  margin-top: 28px;
  border-top: 1px solid #d8dbe3;
}

.document-item {
  padding: 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #d8dbe3;
}

.document-item h3 {
  margin: 0 0 7px;
  color: #23262d;
  font-size: 1rem;
}

.document-filename {
  margin: 0;
  color: #555b67;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.document-unavailable {
  color: #656a75;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
}

.application-profile-page a:focus-visible,
.application-profile-page button:focus-visible,
.application-profile-page input:focus-visible {
  outline: 3px solid #db7293;
  outline-offset: 3px;
}

@media (max-width: 950px), (max-height: 520px) {
  .profile-layout {
    padding: 22px clamp(24px, 6vw, 58px) 64px;
  }
}

@media (max-width: 760px) {
  .profile-layout {
    padding: 28px 10px 64px;
  }

  .profile-card {
    padding: 30px 22px;
    border-radius: 17px;
  }

  .profile-login,
  .document-item {
    grid-template-columns: 1fr;
  }

  .profile-login button,
  .download-button {
    width: 100%;
    min-height: 50px;
  }

  .profile-auth-heading {
    display: grid;
  }

  .profile-auth-heading form,
  .logout-button {
    width: 100%;
  }

  .document-unavailable {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .profile-card {
    padding: 27px 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-login button,
  .download-button,
  .logout-button {
    transition: none;
  }
}
