/* Perfil — layout tipo QOVEX adaptado a SandosScope */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.profile-layout__aside,
.profile-layout__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-card {
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 10px;
  padding: 20px 18px;
  box-shadow: 0 0.75rem 1.5rem rgba(42, 48, 66, 0.06);
}

.profile-card--summary {
  text-align: center;
}

.profile-card__avatar-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.profile-card__avatar.app-shell__profile-avatar,
.profile-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--theme-card-bg);
  box-shadow: 0 0 0 1px var(--theme-card-border);
}

.profile-avatar-form {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
}

.profile-avatar-form__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 4px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.profile-card__avatar-wrap:hover .profile-avatar-form__trigger,
.profile-card__avatar-wrap:focus-within .profile-avatar-form__trigger,
.profile-card__avatar-wrap.is-uploading .profile-avatar-form__trigger {
  opacity: 1;
}

.profile-card__avatar-wrap.is-uploading .profile-avatar-form__label::after {
  content: "…";
}

.profile-avatar-form__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-card__name {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--theme-heading);
  word-break: break-word;
}

.profile-card__role {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--theme-muted);
}

.profile-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--theme-card-border);
  text-align: left;
}

.profile-card__meta-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--theme-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-card__meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-heading);
}

.profile-card__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-heading);
}

.profile-info {
  margin: 0;
}

.profile-info__row {
  padding: 10px 0;
  border-bottom: 1px solid var(--theme-card-border);
}

.profile-info__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-info__row:first-child {
  padding-top: 0;
}

.profile-info dt {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--theme-heading);
}

.profile-info dd {
  margin: 0;
  font-size: 13px;
  color: var(--theme-muted);
  word-break: break-word;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-stat {
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 0.75rem 1.5rem rgba(42, 48, 66, 0.06);
}

.profile-stat__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-muted);
}

.profile-stat__value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--theme-heading);
}

.profile-stat__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--theme-muted);
}

.profile-card--settings {
  padding-top: 12px;
}

.profile-tabs__nav {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--theme-card-border);
}

.profile-tabs__tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 10px 14px;
  margin-bottom: -1px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.profile-tabs__tab:hover {
  color: var(--theme-heading);
}

.profile-tabs__tab.is-active {
  color: #556ee6;
  border-bottom-color: #556ee6;
}

.profile-form-wrap {
  max-width: none;
}

.profile-form__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--theme-muted);
  line-height: 1.45;
}

.profile-form .modal-form__section {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

@media (max-width: 960px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

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