[hidden] {
  display: none !important;
}

.profile-page {
  min-height: 100vh;
  background: #f2f4f6;
}

.profile-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 24px) 0 48px;
}

.profile-auth {
  display: grid;
  min-height: 570px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  grid-template-columns: 0.8fr 1.2fr;
  overflow: hidden;
}

.profile-auth__brand {
  position: relative;
  min-height: 390px;
  background: #10161b;
  overflow: hidden;
}

.profile-auth__brand > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.profile-auth__mark {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  place-items: center;
  background: #fff;
  color: var(--green);
}

.profile-auth__mark svg {
  width: 25px;
}

.profile-auth__content {
  display: flex;
  padding: 52px;
  flex-direction: column;
  justify-content: center;
}

.profile-auth__content h1 {
  margin: 5px 0 10px;
  font-size: 2.25rem;
  line-height: 1.12;
}

.profile-auth__content > p {
  max-width: 540px;
  color: var(--muted);
}

.auth-steps {
  display: grid;
  margin: 20px 0;
  align-items: center;
  grid-template-columns: 1fr auto 1fr auto 1fr;
}

.auth-steps > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #3f4852;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-steps b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  place-items: center;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.auth-steps > svg {
  width: 16px;
  color: var(--line-strong);
}

.auth-status {
  display: flex;
  min-height: 72px;
  padding: 14px 16px;
  border-left: 3px solid var(--yellow);
  align-items: center;
  gap: 12px;
  background: var(--yellow-soft);
}

.auth-status > svg {
  width: 24px;
  flex: 0 0 24px;
  color: var(--yellow);
}

.auth-status span,
.marriage-state span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.auth-status small,
.marriage-state small {
  color: var(--muted);
}

.auth-status.is-pending {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.auth-status.is-pending > svg {
  color: var(--cyan);
}

.auth-actions {
  display: flex;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 9px;
}

.profile-primary,
.profile-secondary,
.icon-command {
  display: inline-flex;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.profile-primary {
  padding: 9px 16px;
  background: var(--charcoal);
  color: #fff;
}

.profile-secondary {
  padding: 9px 14px;
  border-color: var(--line);
  background: #fff;
  color: #29313a;
}

.profile-primary svg,
.profile-secondary svg,
.icon-command svg {
  width: 18px;
}

.profile-primary:disabled,
.profile-secondary:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-safety {
  display: flex;
  padding: 18px 24px;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 12px;
  border-top: 1px solid #bfe4d5;
  background: var(--green-soft);
  color: #195b45;
}

.auth-safety > svg {
  width: 22px;
  flex: 0 0 22px;
}

.auth-safety p {
  margin: 2px 0 0;
  color: #3e6f5f;
  font-size: 0.85rem;
}

.profile-heading {
  display: flex;
  margin: 6px 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  display: grid;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border: 1px solid #9ed7df;
  border-radius: 50%;
  place-items: center;
  background: var(--cyan-soft);
  color: #08798c;
  font-size: 1.65rem;
  font-weight: 900;
}

.profile-identity h1 {
  margin: 2px 0 1px;
  font-size: 2rem;
  line-height: 1.14;
}

.profile-identity p {
  margin: 0;
  color: var(--muted);
}

.profile-heading__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.icon-command {
  width: 44px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
}

.profile-notice {
  display: flex;
  margin-bottom: 16px;
  padding: 10px 13px;
  border-left: 3px solid var(--cyan);
  align-items: center;
  gap: 9px;
  background: var(--cyan-soft);
  color: #215d68;
}

.profile-notice svg {
  width: 18px;
}

.metric-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  display: flex;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  align-items: center;
  gap: 13px;
  background: #fff;
}

.metric > svg {
  width: 28px;
  flex: 0 0 28px;
}

.metric span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric strong {
  font-size: 1.55rem;
  line-height: 1.1;
}

.metric small {
  color: var(--muted);
}

.metric--cyan { border-top: 3px solid var(--cyan); color: #08798c; }
.metric--pink { border-top: 3px solid var(--pink); color: var(--pink); }
.metric--yellow { border-top: 3px solid var(--yellow); color: var(--yellow); }
.metric--green { border-top: 3px solid var(--green); color: var(--green); }

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.profile-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}

.profile-section {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

.profile-section__heading {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 11px;
}

.profile-section__heading h2 {
  margin: 0;
  font-size: 1.08rem;
}

.profile-section__heading--action > div:nth-child(2) {
  min-width: 0;
  margin-right: auto;
}

.profile-section__link {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 5px;
  align-items: center;
  gap: 6px;
  background: var(--violet-soft);
  color: #5d43a3;
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
}

.profile-section__link svg { width: 15px; }

.profile-article-row {
  color: var(--ink);
  text-decoration: none;
}

.profile-article-row:hover { background: #f6f9fa; }
.profile-article-row .profile-list__value { font-size: 0.72rem; }
.profile-article-row .profile-list__value.is-published { color: var(--green); }

.section-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 6px;
  place-items: center;
}

.section-symbol svg { width: 19px; }
.section-symbol--cyan { background: var(--cyan-soft); color: var(--cyan); }
.section-symbol--green { background: var(--green-soft); color: var(--green); }
.section-symbol--yellow { background: var(--yellow-soft); color: var(--yellow); }
.section-symbol--pink { background: var(--pink-soft); color: var(--pink); }
.section-symbol--red { background: var(--red-soft); color: var(--red); }
.section-symbol--violet { background: var(--violet-soft); color: var(--violet); }

.profile-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.profile-list__row {
  display: flex;
  min-height: 54px;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-list__row:last-child {
  border-bottom: 0;
}

.profile-list__row > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.profile-list__row strong,
.profile-list__row small {
  overflow-wrap: anywhere;
}

.profile-list__row small {
  color: var(--muted);
}

.profile-list__value {
  flex: 0 0 auto;
  font-weight: 900;
}

.profile-list__value.is-positive { color: var(--green); }
.profile-list__value.is-negative { color: var(--red); }

.profile-list__empty {
  display: flex;
  min-height: 94px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.stars-summary {
  display: flex;
  margin-bottom: 8px;
  gap: 8px;
}

.stars-summary span {
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--yellow-soft);
  color: #785500;
  font-size: 0.78rem;
}

.restriction-switch {
  display: grid;
  margin-bottom: 8px;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.restriction-switch button {
  min-height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.restriction-switch button + button {
  border-left: 1px solid var(--line);
}

.restriction-switch button.is-active {
  background: var(--red-soft);
  color: var(--red);
}

.restriction-switch span {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  margin-left: 5px;
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
}

.profile-details {
  margin: 0;
  border-top: 1px solid var(--line);
}

.profile-details > div {
  display: flex;
  min-height: 48px;
  padding: 10px 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-details dt {
  color: var(--muted);
}

.profile-details dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.marriage-state {
  display: flex;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #efc4d6;
  border-radius: 7px;
  align-items: center;
  gap: 12px;
  background: var(--pink-soft);
  color: #823053;
}

.marriage-state > svg {
  width: 23px;
  flex: 0 0 23px;
}

.profile-footer {
  display: flex;
  min-height: 58px;
  margin-top: 24px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  align-items: center;
  gap: 10px;
  background: #e9eef4;
  color: #4c5865;
  font-size: 0.82rem;
}

.profile-footer svg {
  width: 18px;
}

.profile-footer time {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .profile-auth {
    grid-template-columns: 0.72fr 1.28fr;
  }

  .profile-auth__content {
    padding: 34px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-shell {
    width: min(100% - 20px, 1180px);
    padding-top: calc(var(--topbar-height) + 14px);
  }

  .profile-auth {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .profile-auth__brand {
    min-height: 210px;
  }

  .profile-auth__content {
    padding: 25px 18px;
  }

  .profile-auth__content h1 {
    font-size: 1.75rem;
  }

  .auth-steps {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .auth-steps > svg {
    display: none;
  }

  .auth-actions,
  .profile-primary,
  .profile-secondary {
    width: 100%;
  }

  .profile-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-heading__actions {
    width: 100%;
  }

  .profile-heading__actions .profile-secondary {
    width: auto;
    flex: 1;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .profile-identity h1 {
    font-size: 1.45rem;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric {
    min-height: 98px;
    padding: 13px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .metric strong {
    font-size: 1.3rem;
  }

  .profile-list__row {
    align-items: flex-start;
  }

  .profile-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-footer time {
    width: 100%;
    margin-left: 28px;
  }
}
