.profile-page {
  min-height: 100vh;
  background: #fff;
  color: #141414;
}

.profile-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(22px, 13.8vw, 220px);
  border-bottom: 1px solid #eeeeee;
  background: #fff;
}

.profile-header__logo {
  display: inline-flex;
  align-items: center;
  width: min(112px, 25vw);
}

.profile-header__logo img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.profile-header__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  background: #f7f7f7;
  color: #4a4a4a;
  font-size: 13px;
  font-weight: 600;
}

.profile-header__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-shell {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 640px);
  gap: clamp(42px, 8vw, 110px);
  width: min(100% - 44px, 1080px);
  margin: 0 auto;
  padding: 62px 0 90px;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.profile-sidebar__nav {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.profile-sidebar__link,
.profile-sidebar__shop-link,
.profile-sidebar__workspace-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5b5b5b;
  font-size: 18px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.profile-sidebar__link--active {
  color: #111;
  font-weight: 700;
}

.profile-sidebar__link:hover,
.profile-sidebar__shop-link:hover,
.profile-sidebar__workspace-link:hover {
  color: #111;
}

.profile-sidebar__shop-link,
.profile-sidebar__workspace-link {
  margin-top: auto;
  color: #777;
  font-size: 12px;
}

.profile-sidebar__workspace-link {
  margin-top: 12px;
  color: #315ea8;
}

.profile-content {
  min-width: 0;
}

.profile-section {
  display: none;
}

.profile-section--active {
  display: block;
}

.profile-section__heading,
.profile-block__heading,
.profile-address-form__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-section__heading {
  min-height: 42px;
  margin-bottom: 21px;
}

.profile-section__heading h1 {
  color: #161616;
  font: 600 18px/1.2 "DM Sans", sans-serif;
  letter-spacing: 0;
}

.profile-eyebrow {
  margin: 0 0 9px;
  color: #777;
  font: 10px "DM Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profile-outline-button,
.profile-primary-button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
}

.profile-outline-button {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #165dcc;
}

.profile-outline-button:hover {
  border-color: #b8b8b8;
  background: #fafafa;
}

.profile-primary-button {
  border: 1px solid #111;
  background: #111;
  color: #fff;
}

.profile-primary-button:hover {
  background: #333;
}

.profile-outline-button--signout {
  color: #165dcc;
}

.profile-card,
.profile-address-card,
.profile-preference,
.profile-orders-list .order-card,
.profile-orders-list .orders-empty {
  border: 1px solid #eeeeee;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

.profile-card {
  padding: 20px 16px;
}

.profile-card--identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}

.profile-card__label {
  color: #777;
  font-size: 13px;
}

.profile-card strong {
  max-width: 70%;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}

.profile-block {
  margin-top: 30px;
}

.profile-block__heading h2 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.profile-addresses {
  display: grid;
  gap: 12px;
  margin-top: 13px;
}

.profile-address-card {
  padding: 17px 16px;
}

.profile-address-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.profile-address-card__edit {
  margin-left: auto;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #315ea8;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-address-card__edit:hover {
  color: #111;
}

.profile-address-card__label {
  color: #222;
  font-size: 13px;
  font-weight: 600;
}

.profile-address-card__recipient,
.profile-address-card__details {
  margin: 7px 0 0;
  color: #777;
  font-size: 12px;
  line-height: 1.55;
}

.profile-address-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f7f7f7;
  color: #444;
  font-size: 18px;
}

.profile-addresses__empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 16px;
  border: 1px solid #eeeeee;
  border-radius: 15px;
  color: #777;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
}

.profile-addresses__empty p {
  margin: 0;
}

.profile-edit-form,
.profile-address-form {
  margin-bottom: 22px;
  padding: 18px 16px;
  border: 1px solid #eeeeee;
  border-radius: 15px;
  background: #fafafa;
}

.profile-edit-form label,
.profile-address-form label {
  display: block;
  margin: 14px 0 6px;
  color: #777;
  font: 10px "DM Mono", monospace;
  letter-spacing: .08em;
}

.profile-edit-form label:first-child,
.profile-address-form label:first-of-type {
  margin-top: 0;
}

.profile-edit-form input,
.profile-address-form input,
.profile-address-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #111;
  outline: 0;
}

.profile-address-form textarea {
  min-height: 80px;
  resize: vertical;
}

.profile-address-location {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #dfe4eb;
  border-radius: 12px;
  background: #f7f9fc;
}

.profile-address-location__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-address-location__tag {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font: 10px "DM Mono", monospace;
  letter-spacing: .08em;
}

.profile-address-location h4 {
  margin: 0;
  color: #202020;
  font-size: 14px;
}

.profile-address-location__heading p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.profile-location-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #c9d4e2;
  border-radius: 7px;
  background: #fff;
  color: #1e3a5f;
  font: 600 11px "DM Sans", sans-serif;
  cursor: pointer;
}

.profile-location-button:hover {
  border-color: #165dcc;
  background: #eef5ff;
}

.profile-location-search {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #c9d4e2;
  border-radius: 7px;
  background: #fff;
  color: #111;
  outline: 0;
}

.profile-location-map {
  position: relative;
  width: 100%;
  height: 240px;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid #c9d4e2;
  border-radius: 7px;
  background: #eaf1f8;
}

.profile-location-map .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: "DM Sans", sans-serif;
}

.profile-location-map .leaflet-control-attribution {
  font-size: 9px;
}

.profile-location-map__preview {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px;
  box-sizing: border-box;
  color: #64748b;
  text-align: center;
}

.profile-location-map__preview > span {
  font-size: 26px;
}

.profile-location-map__preview strong {
  color: #202020;
  font-size: 13px;
}

.profile-location-map__preview p {
  max-width: 320px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.profile-location-status {
  min-height: 18px;
  margin: 0;
  color: #475569;
  font-size: 11px;
  line-height: 1.45;
}

.profile-location-status strong {
  color: #1e3a5f;
}

.profile-location-status a {
  color: #165dcc;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-location-status--error {
  color: #a23c3c;
}

.profile-location-status--error strong {
  color: #a23c3c;
}

.profile-edit-form input:focus,
.profile-address-form input:focus,
.profile-address-form textarea:focus,
.profile-location-search:focus {
  border-color: #165dcc;
  box-shadow: 0 0 0 3px rgba(22, 93, 204, .1);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-edit-form__actions,
.profile-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}

.profile-edit-form__actions {
  margin-top: 18px;
}

.profile-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #165dcc;
  font-size: 13px;
  cursor: pointer;
}

.profile-text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-address-form__heading {
  margin-bottom: 16px;
}

.profile-address-form__heading h3 {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}

.profile-form-message,
.profile-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #307344;
  font-size: 12px;
}

.profile-form-message--error,
.profile-status--error {
  color: #a23c3c;
}

@media (max-width: 640px) {
  .profile-address-location__heading {
    flex-direction: column;
  }

  .profile-location-button {
    width: 100%;
  }
}

.profile-preference {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 42px;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 18px 16px;
  color: #202020;
  font-size: 13px;
}

.profile-preference__icon {
  color: #555;
  font-size: 17px;
}

.profile-preference input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.profile-toggle {
  position: relative;
  display: block;
  width: 40px;
  height: 24px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.profile-toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #777;
  content: "";
  transition: transform .18s ease, background .18s ease;
}

.profile-preference input:checked + .profile-toggle::after {
  transform: translateX(16px);
  background: #165dcc;
}

.profile-preference input:focus-visible + .profile-toggle {
  outline: 2px solid #165dcc;
  outline-offset: 3px;
}

.profile-actions {
  margin-top: 28px;
}

.profile-orders-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  color: #777;
  font-size: 12px;
}

.profile-orders-list {
  display: grid;
  gap: 12px;
}

.profile-orders-list .order-card,
.profile-orders-list .orders-empty {
  padding: 17px 16px;
}

.profile-orders-list .order-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.profile-orders-list .order-card__date,
.profile-orders-list .order-card__items,
.profile-orders-list .order-card__payment {
  margin: 8px 0 0;
  color: #777;
  font-size: 12px;
  line-height: 1.55;
}

.profile-orders-list .order-card__status {
  margin: 12px 0 0;
  color: #165dcc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-orders-list .order-card__tracking,
.profile-orders-list .order-card__charges,
.profile-orders-list .order-card__message,
.profile-orders-list .order-card__customer-note {
  margin-top: 11px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f7f7;
  color: #555;
  font-size: 11px;
  line-height: 1.55;
}

.profile-orders-list .order-card a {
  color: #165dcc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .profile-header {
    padding: 12px 20px;
  }

  .profile-shell {
    display: block;
    width: min(100% - 32px, 640px);
    padding: 30px 0 55px;
  }

  .profile-sidebar {
    min-height: 0;
    margin-bottom: 35px;
  }

  .profile-sidebar__nav {
    display: flex;
    gap: 22px;
  }

  .profile-sidebar__shop-link {
    margin-top: 24px;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
