.profile-page {
  min-width: 0;
  padding-bottom: 12px;
}
#main > .profile-page {
  animation: none;
}
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -3px 0 23px;
  padding: 3px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.profile-back:hover {
  color: var(--blue);
}
.profile-back .icon {
  width: 15px;
  height: 15px;
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.profile-page .profile-avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.6px;
}
.profile-heading {
  min-width: 0;
}
.profile-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.1px;
  line-height: 1.5;
}
.profile-heading h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.24;
  font-weight: 650;
  letter-spacing: -0.95px;
  overflow-wrap: anywhere;
}
.profile-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.profile-subline > span,
.profile-subline > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profile-subline .icon {
  width: 14px;
  height: 14px;
}
.profile-header-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.profile-owner {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.profile-owner .avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}
.profile-owner strong,
.profile-owner small {
  display: block;
  line-height: 1.5;
}
.profile-owner strong {
  font-size: 12px;
  font-weight: 550;
}
.profile-owner small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 25px;
  padding: 21px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0 23px;
}
.profile-stat + .profile-stat {
  border-left: 1px solid var(--line);
}
.profile-stat > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.profile-stat > strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 560;
  letter-spacing: -0.8px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.profile-stat > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.profile-tabs {
  display: flex;
  align-items: stretch;
  gap: 25px;
  max-width: 100%;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #cad2e1 transparent;
}
.profile-tab {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 1px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  white-space: nowrap;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.profile-tab:hover {
  color: var(--blue);
}
.profile-tab.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.profile-tab:focus-visible {
  outline-offset: -2px;
  border-radius: 4px 4px 0 0;
}
.profile-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 5px;
  color: #68758a;
  background: #eaeef4;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.6;
}
.profile-tab.active .tab-count {
  background: #e5ecff;
  color: var(--blue);
}
.profile-tab-panel {
  min-width: 0;
  outline: none;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr);
  gap: 22px;
  align-items: start;
}
.profile-main,
.profile-aside,
.profile-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.profile-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}
.profile-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 19px;
  border-bottom: 1px solid #edf0f5;
}
.profile-card-head > div {
  min-width: 0;
}
.profile-card-head h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.22px;
}
.profile-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.profile-card-head > .profile-inline-link,
.profile-card-head > .profile-entity-link {
  flex-shrink: 0;
  margin-top: 3px;
}
.profile-card-body {
  padding: 22px;
  min-width: 0;
}
.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
  margin: 0;
}
.profile-fields.single {
  grid-template-columns: minmax(0, 1fr);
  gap: 21px;
}
.profile-fields > div {
  min-width: 0;
}
.profile-fields dt {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.profile-fields dd {
  margin: 0;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.profile-fields dd small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.profile-note,
.profile-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 17px;
  border: 1px solid #dce5ff;
  border-radius: 8px;
  background: #f1f5ff;
  color: #365abb;
  font-size: 12px;
  line-height: 1.7;
}
.profile-note > .icon,
.profile-alert > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.profile-note strong,
.profile-alert strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}
.profile-note p,
.profile-alert p {
  margin: 0;
  line-height: 1.7;
}
.profile-alert {
  align-items: center;
  flex-wrap: wrap;
  border-color: #eee2bc;
  background: #fffbef;
  color: #80601b;
}
.profile-alert > div {
  flex: 1;
  min-width: 180px;
}
.profile-alert > .btn {
  flex-shrink: 0;
  border-color: #e3d6ac;
  background: #fffef9;
  color: #78591a;
}
.profile-alert > .btn:hover {
  border-color: #cbbb8c;
  background: #fff8e6;
}
.profile-card-body > .profile-note:not(:first-child),
.profile-card-body > .profile-alert:not(:first-child) {
  margin-top: 22px;
}
.profile-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.profile-person-copy {
  flex: 1;
  min-width: 0;
}
.profile-person-copy strong,
.profile-person-copy small,
.profile-person-copy > span {
  display: block;
  overflow-wrap: anywhere;
}
.profile-person-copy > span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
}
.profile-tab-panel > .profile-alert {
  margin-bottom: 22px;
}
.profile-balance small {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.profile-balance ~ .profile-fields {
  margin-top: 24px;
}
.profile-contract + .profile-fields {
  margin-top: 20px;
}
.profile-card-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.profile-stat:hover > span {
  color: var(--blue);
}
.profile-person-copy strong {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.6;
}
.profile-person-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.profile-person-copy > a {
  display: inline-flex;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-contact-list > .profile-person {
  padding: 18px 0;
}
.profile-contact-list > .profile-person:first-child {
  padding-top: 0;
}
.profile-contact-list > .profile-person:last-child {
  padding-bottom: 0;
}
.profile-contact-list > .profile-person + .profile-person {
  border-top: 1px solid var(--line);
}
.profile-entity-link,
.profile-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  overflow-wrap: anywhere;
}
.profile-entity-link:hover,
.profile-inline-link:hover {
  color: #2048d1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.profile-inline-link .icon,
.profile-entity-link .icon {
  width: 14px;
  height: 14px;
}
.profile-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #cad2e1 transparent;
}
.profile-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.profile-table th {
  padding: 13px 20px;
  background: #fcfdff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.5px;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}
.profile-table td {
  padding: 19px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  vertical-align: middle;
}
.profile-table tr:hover td {
  background: #fcfdff;
}
.profile-table td > small,
.profile-table .table-title small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
}
.profile-table .table-title {
  min-width: 160px;
}
.profile-table .table-title strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.6;
}
.profile-table .profile-person {
  min-width: 200px;
}
.profile-table .profile-entity-link {
  font-size: inherit;
}
.profile-table td:last-child > .btn,
.profile-table td:last-child > .profile-inline-link {
  white-space: nowrap;
}
.profile-table td .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 230px;
  padding: 35px 24px;
  text-align: center;
}
.profile-empty > .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  color: #8c9aba;
}
.profile-empty strong {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.6;
}
.profile-empty p {
  max-width: 350px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.profile-empty .btn {
  margin-top: 10px;
}
.profile-activity {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-activity-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding-bottom: 24px;
}
.profile-activity-item:last-child {
  padding-bottom: 0;
}
.profile-activity-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -5px;
  left: 4px;
  width: 1px;
  background: #e2e7f0;
}
.profile-activity-item .activity-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px #c4d3fa;
}
.profile-activity-item .activity-content {
  min-width: 0;
}
.activity-content strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.65;
}
.activity-content p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.activity-content small {
  display: block;
  margin-top: 6px;
  color: #818d9f;
  font-size: 10px;
  line-height: 1.6;
}
.profile-document {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 17px 0;
}
.profile-document:first-child {
  padding-top: 0;
}
.profile-document:last-child {
  padding-bottom: 0;
}
.profile-document + .profile-document {
  border-top: 1px solid var(--line);
}
.profile-document > .icon {
  width: 35px;
  height: 39px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #70809d;
  background: #fbfcff;
}
.document-copy {
  flex: 1;
  min-width: 0;
}
.document-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.document-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.profile-contract {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.profile-contract strong {
  display: block;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.6;
}
.profile-contract-number {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-chips > span,
.profile-chips > .profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #e0e7f5;
  border-radius: 6px;
  background: #f7f9ff;
  color: #45629d;
  font-size: 11px;
  line-height: 1.6;
}
.profile-chips .icon {
  width: 14px;
  height: 14px;
}
.profile-progress {
  height: 7px;
  margin: 13px 0;
  border-radius: 8px;
  background: #ebeff6;
  overflow: hidden;
}
.profile-progress > span {
  display: block;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.profile-balance {
  display: block;
  color: var(--ink);
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -1.1px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.profile-note-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-note-editor label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}
.profile-note-editor textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 12px 13px;
  border: 1px solid #dbe1eb;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  resize: vertical;
}
.profile-note-editor textarea::placeholder {
  color: #8c96a7;
}
.profile-note-editor textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #2854e812;
}
.profile-note-editor > div:last-child,
.profile-note-editor .actionrow,
.profile-note-editor .profile-note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-note-editor small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.profile-status {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f2f6;
  color: #5c687a;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.65;
  white-space: nowrap;
}
.profile-status.tone-green {
  background: #e8f5ee;
  color: #127345;
}
.profile-status.tone-blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.profile-status.tone-amber {
  background: #fff4d9;
  color: #876118;
}
.profile-status.tone-red {
  background: #fcecef;
  color: #b63746;
}
.profile-status.tone-slate {
  background: #f0f2f6;
  color: #5c687a;
}

@media (max-width: 1250px) {
  .profile-header {
    align-items: flex-start;
    gap: 18px;
  }
  .profile-heading h1 {
    font-size: 27px;
    letter-spacing: -0.75px;
  }
  .profile-header-actions {
    max-width: 220px;
    gap: 12px;
  }
  .profile-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
    gap: 18px;
  }
  .profile-stat {
    padding: 0 18px;
  }
  .profile-stat > strong {
    font-size: 25px;
  }
  .profile-card-head {
    padding: 19px 20px 17px;
  }
  .profile-card-body {
    padding: 20px;
  }
  .profile-fields {
    column-gap: 20px;
  }
  .profile-tabs {
    gap: 22px;
  }
  .profile-table th,
  .profile-table td {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (max-width: 1000px) {
  .profile-identity {
    gap: 14px;
  }
  .profile-page .profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .profile-aside > .profile-alert,
  .profile-aside > .profile-note {
    grid-column: 1 / -1;
  }
}
@media (max-width: 800px) {
  .profile-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .profile-header-actions {
    max-width: none;
    justify-content: space-between;
  }
  .profile-heading h1 {
    font-size: 26px;
  }
  .profile-stat {
    padding: 0 14px;
  }
  .profile-stat > span {
    font-size: 11px;
  }
  .profile-stat > strong {
    font-size: 23px;
  }
  .profile-stat > small {
    font-size: 10px;
  }
  .profile-tabs {
    gap: 22px;
  }
  .profile-tab {
    font-size: 12px;
  }
  .profile-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-table th,
  .profile-table td {
    padding-left: 17px;
    padding-right: 17px;
  }
}
@media (max-width: 580px) {
  .profile-back {
    margin-top: -3px;
    margin-bottom: 22px;
    font-size: 11px;
  }
  .profile-header {
    margin-bottom: 23px;
  }
  .profile-identity {
    align-items: flex-start;
    gap: 12px;
  }
  .profile-page .profile-avatar {
    width: 49px;
    height: 49px;
    font-size: 17px;
    margin-top: 3px;
  }
  .profile-eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }
  .profile-heading h1 {
    font-size: 24px;
    line-height: 1.28;
    letter-spacing: -0.6px;
  }
  .profile-subline {
    gap: 7px 9px;
    margin-top: 9px;
    font-size: 11px;
  }
  .profile-header-actions {
    gap: 12px;
  }
  .profile-header-actions .btn {
    padding: 9px 12px;
    font-size: 11px;
  }
  .profile-owner {
    gap: 8px;
  }
  .profile-owner .avatar {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }
  .profile-owner strong {
    font-size: 11px;
  }
  .profile-owner small {
    font-size: 9px;
  }
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    margin-bottom: 22px;
  }
  .profile-stat {
    padding: 17px 17px 18px;
    gap: 6px;
  }
  .profile-stat:nth-child(3) {
    border-left: 0;
  }
  .profile-stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .profile-stat > span {
    font-size: 11px;
  }
  .profile-stat > strong {
    font-size: 25px;
  }
  .profile-stat > small {
    font-size: 10px;
  }
  .profile-tabs {
    gap: 20px;
    margin-bottom: 20px;
  }
  .profile-tab {
    padding-bottom: 13px;
    font-size: 12px;
  }
  .profile-tab .tab-count {
    min-width: 18px;
    padding: 1px 5px;
    font-size: 9px;
  }
  .profile-main,
  .profile-aside,
  .profile-stack {
    gap: 16px;
  }
  .profile-aside {
    display: flex;
    flex-direction: column;
  }
  .profile-grid,
  .profile-split {
    gap: 16px;
  }
  .profile-card {
    border-radius: 9px;
  }
  .profile-card-head {
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 18px 16px;
  }
  .profile-card-head h2 {
    font-size: 14px;
  }
  .profile-card-head p {
    font-size: 11px;
  }
  .profile-card-body {
    padding: 18px;
  }
  .profile-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .profile-fields dt {
    margin-bottom: 5px;
  }
  .profile-fields dd {
    font-size: 13px;
  }
  .profile-note,
  .profile-alert {
    padding: 13px 14px;
    font-size: 11px;
    gap: 9px;
  }
  .profile-alert > .btn {
    margin-left: 27px;
  }
  .profile-person {
    gap: 10px;
    flex-wrap: wrap;
  }
  .profile-person-copy {
    min-width: 160px;
  }
  .profile-person > .profile-status {
    margin-left: 48px;
  }
  .profile-table th,
  .profile-table td {
    padding-left: 16px;
    padding-right: 16px;
  }
  .profile-table td {
    font-size: 13px;
  }
  .profile-table .profile-person {
    flex-wrap: nowrap;
  }
  .profile-table .profile-person-copy {
    min-width: 140px;
  }
  .profile-table .table-title {
    min-width: 175px;
  }
  .profile-table td:not(:first-child) {
    min-width: 110px;
  }
  .profile-empty {
    min-height: 210px;
    padding: 30px 18px;
  }
  .profile-document {
    flex-wrap: wrap;
    gap: 10px;
  }
  .document-copy {
    min-width: 200px;
  }
  .profile-document > .profile-status,
  .profile-document > .btn,
  .profile-document > .profile-inline-link {
    margin-left: 45px;
  }
  .profile-contract {
    gap: 12px;
  }
  .profile-contract strong {
    font-size: 15px;
  }
  .profile-balance {
    font-size: 31px;
  }
  .profile-note-editor textarea {
    min-height: 125px;
    font-size: 16px;
  }
}
